Platform: macOS. Allow building on directory with whitespace (For example /Volumes...
authorArto Kitula <arto.kitula@gmail.com>
Fri, 11 May 2018 18:56:13 +0000 (21:56 +0300)
committerArto Kitula <arto.kitula@gmail.com>
Fri, 11 May 2018 18:56:13 +0000 (21:56 +0300)
build_files/cmake/platform/platform_apple.cmake

index caaf7b96d0ecbcd6e2a85fd4c4c748dd9ecfc042..93d7220c8845862537bfc00326c6fb9ea50dd3d5 100644 (file)
@@ -356,7 +356,7 @@ if(WITH_LLVM)
                        execute_process(COMMAND ${LLVM_CONFIG} --libfiles
                                        OUTPUT_VARIABLE LLVM_LIBRARY
                                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-                       string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
+                       string(REPLACE ".a /" ".a;/" LLVM_LIBRARY ${LLVM_LIBRARY})
                else()
                        set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
                endif()
@@ -416,7 +416,7 @@ if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
 endif()
 # Get rid of eventually clashes, we export some symbols explicite as local
 set(PLATFORM_LINKFLAGS
-       "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map"
+       "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
 )
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")