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 <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-12-05 11:37:40 +00:00
parent c18653d27e
commit c9595c3668
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 11 additions and 6 deletions

View File

@ -71,10 +71,13 @@ 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 "")
#
# 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: