fix build on xcode with openmp
authorArto Kitula <arto.kitula@gmail.com>
Wed, 13 Feb 2019 20:34:40 +0000 (22:34 +0200)
committerArto Kitula <arto.kitula@gmail.com>
Wed, 13 Feb 2019 20:34:40 +0000 (22:34 +0200)
build_files/cmake/platform/platform_apple.cmake
release/datafiles/locale
release/scripts/addons
source/tools

index 2515867..2bd9056 100644 (file)
@@ -394,10 +394,16 @@ if(WITH_OPENMP)
                set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${LIBDIR}/openmp/lib -lomp")
 
                # Copy libomp.dylib to allow executables like datatoc to work.
-               execute_process(
-                       COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
-                       COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
-               )
+    if(CMAKE_MAKE_PROGRAM MATCHES "xcodebuild")
+      set(OPENMP_DYLIB_AUX_PATH "${CMAKE_BINARY_DIR}/bin")
+    else()
+      set(OPENMP_DYLIB_AUX_PATH "${CMAKE_BINARY_DIR}")
+    endif()
+
+    execute_process(
+      COMMAND mkdir -p ${OPENMP_DYLIB_AUX_PATH}/Resources/lib
+      COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${OPENMP_DYLIB_AUX_PATH}/Resources/lib/libomp.dylib
+      )
        endif()
 endif()
 
index 4be9fbe..f81ed05 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 4be9fbe61cb1e23baf25c9c379ecd13e22ca1898
+Subproject commit f81ed052157aff3979763cf25840032d11d261b6
index f999cc0..890a240 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f999cc0908333ac0d4b2b203706f3eb640ba54c9
+Subproject commit 890a240c550430f9866352d3f1fd8a8c34840c4b
index 83428cb..3f0d91e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 83428cbf0a8d7e0bdd7a91c00124381c1db42e70
+Subproject commit 3f0d91e9249bf35b92ee745e2c45c460c869fb25