From e4f230a3e18ca8d8a1a68d609d206a1191055c93 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 22 Jul 2022 00:05:42 +0200 Subject: [PATCH] CMake: Support spaces in install path with symlinks Add quotes around the paths so they are treated as one argument. --- build/cmake/install.cmake | 4 ++-- build/cmake/utils/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/cmake/install.cmake b/build/cmake/install.cmake index 9a2ce91d7f..020fa860a2 100644 --- a/build/cmake/install.cmake +++ b/build/cmake/install.cmake @@ -42,8 +42,8 @@ else() install(DIRECTORY DESTINATION "bin") install(CODE "execute_process( \ COMMAND ${CMAKE_COMMAND} -E create_symlink \ - ${CMAKE_INSTALL_PREFIX}/lib/wx/config/${wxBUILD_FILE_ID} \ - ${CMAKE_INSTALL_PREFIX}/bin/wx-config \ + \"${CMAKE_INSTALL_PREFIX}/lib/wx/config/${wxBUILD_FILE_ID}\" \ + \"${CMAKE_INSTALL_PREFIX}/bin/wx-config\" \ )" ) endif() diff --git a/build/cmake/utils/CMakeLists.txt b/build/cmake/utils/CMakeLists.txt index 47bca6f34a..dbfedec79f 100644 --- a/build/cmake/utils/CMakeLists.txt +++ b/build/cmake/utils/CMakeLists.txt @@ -39,8 +39,8 @@ if(wxUSE_XRC) wx_install(CODE "execute_process( \ COMMAND ${CMAKE_COMMAND} -E create_symlink \ - ${CMAKE_INSTALL_PREFIX}/bin/${wxrc_output_name}${EXE_SUFFIX} \ - ${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \ + \"${CMAKE_INSTALL_PREFIX}/bin/${wxrc_output_name}${EXE_SUFFIX}\" \ + \"${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX}\" \ )" ) endif()