Fix finding wxWidgets on Gentoo.

Prefer the `wx-config` from PATH on Gentoo, because that points to the
eselected wxWidgets build.

This is already done for Win32 builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-09-24 01:33:45 +00:00
parent 80634683b1
commit 98b2fb6ebb
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 10 additions and 7 deletions

View File

@ -68,15 +68,18 @@ function(check_clean_exit var)
endfunction()
function(find_wx_util var util)
# on win32, including cross builds we prefer the plain utility name first from PATH
if(WIN32)
set(conf_suffixes "" gtk4u gtk4 gtk3u gtk3 gtk2u gtk2)
set(major_versions "" 4 3 2)
else()
set(conf_suffixes gtk4u gtk4 gtk3u gtk3 gtk2u gtk2 "")
set(major_versions 4 3 2 "")
if(WIN32 OR EXISTS /etc/gentoo-release)
# On win32, including cross builds we prefer the plain utility name
# first from PATH.
# On Gentoo /usr/bin/wx-config loads the eselected build, so we want
# to try that first.
set(conf_suffixes "")
set(major_versions "")
endif()
list(APPEND conf_suffixes gtk4u gtk4 gtk3u gtk3 gtk2u gtk2 "")
list(APPEND major_versions 4 3 2 "")
foreach(conf_suffix IN LISTS conf_suffixes)
foreach(major_version IN LISTS major_versions)
foreach(minor_version RANGE 100 -1 -1)