From c9595c366827974fdc2613f0b65d4490cf23b7b6 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 5 Dec 2020 11:37:40 +0000 Subject: [PATCH] Fix checking for `wx-config` first on Gentoo. Followup on 98b2fb6e. To make a one element of empty string list in cmake, you have to set the variable to `";"`. If it is set to `""`, a subsequent `list(APPEND ...)` will consider the variable unset. With this fix, `/usr/bin/wx-config` is tried first on Gentoo, as was intended in 98b2fb6e. The rationale for this is that on Gentoo, app-eselect/eselect-wxwidgets links `/usr/bin/wx-config` to the user's preferred version of wxWidgets, while on other distributions such as Arch, we want to check for the 3.x gtk3 variant explicitly first. Also add a modeline to `VbamFunctions.cmake`. Signed-off-by: Rafael Kitover --- cmake/VbamFunctions.cmake | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cmake/VbamFunctions.cmake b/cmake/VbamFunctions.cmake index 5cc8ee28..0bae5068 100644 --- a/cmake/VbamFunctions.cmake +++ b/cmake/VbamFunctions.cmake @@ -69,12 +69,15 @@ endfunction() function(find_wx_util var util) 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 "") + # 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. + # + # This makes a one element of empty string list. + set(conf_suffixes ";") + set(major_versions ";") endif() list(APPEND conf_suffixes gtk4u gtk4 gtk3u gtk3 gtk2u gtk2 "") @@ -132,3 +135,5 @@ function(find_wx_util var util) set(${var} ${util} PARENT_SCOPE) endforeach() endfunction() + +# vim:sw=4 sts et: