Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArto Kitula <arto.kitula@gmail.com>2019-02-13 23:34:40 +0300
committerArto Kitula <arto.kitula@gmail.com>2019-02-13 23:34:40 +0300
commit11ec57e211f4814bf20933f2f007f77e30ec1ef0 (patch)
treebeace69d10e7f558b4f3a128eee433ec84e6fb94 /build_files
parent8365de52bc6cd7d019bfebe7ffc2ddc083cd4493 (diff)
fix build on xcode with openmp
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_apple.cmake14
1 files changed, 10 insertions, 4 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 2515867d442..2bd9056d1a7 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -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()