Commit 46f52941 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

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.
parent 437b366e
...@@ -76,18 +76,22 @@ SET(wxWidgets_USE_UNICODE ON) ...@@ -76,18 +76,22 @@ 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
foreach(gtk_ver 4 3) #
set(wxWidgets_CONFIG_EXECUTABLE wx-config-gtk${gtk_ver}) # Do not do the check if the WX_CONFIG env var is set.
find_package(wxWidgets QUIET) if(NOT $ENV{WX_CONFIG})
if(wxWidgets_FOUND) foreach(gtk_ver 4 3)
break() set(wxWidgets_CONFIG_EXECUTABLE wx-config-gtk${gtk_ver})
endif() find_package(wxWidgets QUIET)
endforeach() if(wxWidgets_FOUND)
break()
endif()
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment