Speedup wx-config search on MSYS2.

Search for wx-config-static for static builds first, and wx-config
otherwise, before trying any config and version suffixes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2022-02-04 04:45:07 +00:00
parent 7853718627
commit 87e41300f1
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 13 additions and 12 deletions

View File

@ -78,22 +78,23 @@ function(check_clean_exit var)
endfunction()
function(find_wx_util var util)
if(EXISTS /etc/gentoo-release)
# On win32, including cross builds we prefer the plain utility name
# first from PATH.
if(WIN32 OR EXISTS /etc/gentoo-release)
# On win32, including cross builds we prefer the plain utility
# name first from PATH, with the exception of -static for static
# builds.
#
# On Gentoo /usr/bin/wx-config loads the eselected build, so we want
# to try that first.
# On Gentoo /usr/bin/wx-config loads the eselected build, so we
# want to try that first.
#
# This makes a one element of empty string list.
set(conf_suffixes ";")
set(major_versions ";")
elseif(WIN32)
set(major_versions ";")
endif()
if(VBAM_STATIC)
list(APPEND conf_suffixes static)
if(VBAM_STATIC)
set(conf_suffixes "static;")
else()
set(conf_suffixes ";")
endif()
set(major_versions ";")
endif()
list(APPEND conf_suffixes gtk4u gtk4 gtk3u gtk3 gtk2u gtk2 "")