summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-07-24 21:08:31 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-07-24 21:23:32 (GMT)
commit17bab9e7090cb804f86fc0d62d100e25745232c4 (patch)
treea74b18f4640331b76582563614744cf3e7e83841
parent13f7ae287820836a16f6a1f70617b3d494b232d7 (diff)
downloadCMake-17bab9e7090cb804f86fc0d62d100e25745232c4.zip
CMake-17bab9e7090cb804f86fc0d62d100e25745232c4.tar.gz
CMake-17bab9e7090cb804f86fc0d62d100e25745232c4.tar.bz2
FindwxWindows: Replace exec_program() with execute_process()
-rw-r--r--Modules/FindwxWindows.cmake13
1 files changed, 7 insertions, 6 deletions
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 6e4be91..d1b25e1 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -635,14 +635,14 @@ else()
# remember: always link shared to use systems GL etc. libs (no static
# linking, just link *against* static .a libs)
if(WXWINDOWS_USE_SHARED_LIBS)
- set(WX_CONFIG_ARGS_LIBS "--libs")
+ set(WX_CONFIG_ARGS_LIBS --libs)
else()
- set(WX_CONFIG_ARGS_LIBS "--static --libs")
+ set(WX_CONFIG_ARGS_LIBS --static --libs)
endif()
# do we need additionial wx GL stuff like GLCanvas ?
if(WXWINDOWS_USE_GL)
- string(APPEND WX_CONFIG_ARGS_LIBS " --gl-libs" )
+ list(APPEND WX_CONFIG_ARGS_LIBS --gl-libs)
endif()
##message("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
@@ -662,14 +662,15 @@ else()
##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
# keep the back-quoted string for clarity
- set(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`")
+ string(REPLACE ";" " " _wx_config_args_libs "${WX_CONFIG_ARGS_LIBS}")
+ set(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${_wx_config_args_libs}`")
##message("DBG2: for linking:
##WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===")
# evaluate wx-config output to separate linker flags and linkdirs for
# rpath:
- exec_program(${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
- ARGS ${WX_CONFIG_ARGS_LIBS}
+ execute_process(COMMAND ${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
+ ${WX_CONFIG_ARGS_LIBS}
OUTPUT_VARIABLE WX_CONFIG_LIBS )
## extract linkdirs (-L) for rpath