do not prefer wxgtk3 if $ENV{WX_CONFIG} is set
Skip the check for wx-config-gtk3 if the WX_CONFIG environment variable is set, indicating that the user wants to override the version of wx to build against.
This commit is contained in:
parent
437b366e39
commit
46f5294129
|
@ -76,8 +76,11 @@ SET(wxWidgets_USE_UNICODE ON)
|
||||||
set(wxWidgets_USE_LIBS xrc xml html adv net core base)
|
set(wxWidgets_USE_LIBS xrc xml html adv net core base)
|
||||||
#list(APPEND wxWidgets_CONFIG_OPTIONS --version=2.8)
|
#list(APPEND wxWidgets_CONFIG_OPTIONS --version=2.8)
|
||||||
|
|
||||||
# check for gtk4 then gtk3 packages first, some dists like arch rename the
|
# Check for gtk4 then gtk3 packages first, some dists like arch rename the
|
||||||
# wx-config utility for these packages
|
# wx-config utility for these packages to e.g. wx-config-gtk3
|
||||||
|
#
|
||||||
|
# Do not do the check if the WX_CONFIG env var is set.
|
||||||
|
if(NOT $ENV{WX_CONFIG})
|
||||||
foreach(gtk_ver 4 3)
|
foreach(gtk_ver 4 3)
|
||||||
set(wxWidgets_CONFIG_EXECUTABLE wx-config-gtk${gtk_ver})
|
set(wxWidgets_CONFIG_EXECUTABLE wx-config-gtk${gtk_ver})
|
||||||
find_package(wxWidgets QUIET)
|
find_package(wxWidgets QUIET)
|
||||||
|
@ -89,6 +92,7 @@ endforeach()
|
||||||
if(NOT wxWidgets_FOUND)
|
if(NOT wxWidgets_FOUND)
|
||||||
unset(wxWidgets_CONFIG_EXECUTABLE)
|
unset(wxWidgets_CONFIG_EXECUTABLE)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# the gl lib may not be available, and if it looks like it is we still have to
|
# the gl lib may not be available, and if it looks like it is we still have to
|
||||||
# do a compile test later
|
# do a compile test later
|
||||||
|
|
Loading…
Reference in New Issue