Browse Source

Merge pull request #1739 from koja/cmake_fix

Avoid special chars in paths in MRI script passed to ar utility
Yao Wei Tjong 9 years ago
parent
commit
b6f10c6f48
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/Urho3D/CMakeLists.txt

+ 2 - 2
Source/Urho3D/CMakeLists.txt

@@ -357,10 +357,10 @@ if (NOT XCODE AND NOT MSVC)
                 COMMAND libtool -static $<TARGET_FILE:${TARGET_NAME}>.engine ${ARCHIVES} -o $<TARGET_FILE:${TARGET_NAME}>
                 COMMAND rm $<TARGET_FILE:${TARGET_NAME}>.engine
                 COMMENT "Merging all archives into a single static library using libtool")
-        elseif (EMSCRIPTEN OR CMAKE_BINARY_DIR MATCHES " ")
+        elseif (EMSCRIPTEN OR CMAKE_BINARY_DIR MATCHES "[ +*;,]")
             # Do it the hard way by first extracting the object (bitcode) files and appending them to final archive:
             # a) For Emscripten build as Emscripten emar (llvm-ar) neither takes archives directly as input nor supports MRI-style script
-            # b) When the build tree path contains spaces because MRI script does not support spaces in path even with proper escape
+            # b) When the build tree path contains special characters for MRI scripts (space, '+', '*', ';', ',') as escaping is not supported
             get_filename_component (AR ${CMAKE_AR} NAME_WE)
             if (CMAKE_HOST_WIN32)
                 add_custom_command (TARGET ${TARGET_NAME} POST_BUILD