From 31f77fc04052dcd699071b7717e53c5f38c748ab Mon Sep 17 00:00:00 2001 From: Marcus A Date: Sat, 21 Jul 2018 11:12:46 +0200 Subject: [PATCH] Fix detection of wxWidgets toolkit wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It must be evaluated when querying the toolkit to avoid a mismatch between the version actually used and the version KiCad assumes to be used. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 337a47f09a..3ebda2d7ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -555,7 +555,7 @@ endif() # Turn on wxWidgets compatibility mode for some classes add_definitions( -DWX_COMPATIBILITY ) -# See line 41 of CMakeModules/FindwxWidgets.cmake +# See line 49 of CMakeModules/FindwxWidgets.cmake set( wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --static=no ) find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc REQUIRED ) @@ -564,7 +564,8 @@ find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc R include( ${wxWidgets_USE_FILE} ) # Check the toolkit used to build wxWidgets -execute_process( COMMAND sh -c "${wxWidgets_CONFIG_EXECUTABLE} --query-toolkit" +execute_process( + COMMAND sh -c "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_CONFIG_OPTIONS} --query-toolkit" RESULT_VARIABLE wxWidgets_TOOLKIT_RESULT OUTPUT_VARIABLE wxWidgets_TOOLKIT_FOUND OUTPUT_STRIP_TRAILING_WHITESPACE