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:
authorAnkit Meel <ankitjmeel@gmail.com>2021-08-03 18:19:40 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2021-08-03 18:19:40 +0300
commit652fbc200500497a67bd11d18b786587ba34e3d9 (patch)
treec08748c1d77552fbb3f8af0df7e3d6c1d8c302d5 /CMakeLists.txt
parenta25a1f39aa1de148605b85ee5f18e52e8038c303 (diff)
macOS: Portable builds with dynamic libraries.
For Blender.app: dropping libomp.dylib next to Blender executable is enough for it getting picked up since `@executable_path` is an rpath. For non-distributed binaries datatoc, makesdna, tests etc, code for copying libomp.dylib to build folder is removed and replaced by CMake's rpath option for *build* tree. For bpy.so, the post build rpath change has also been replaced by CMake rpath option for *install* tree. Since -id has been changed in D11748, remove the `install_name_tool -change ...` command. Any dylib can just be dropped at `MAC_BLENDER_TARGET_DYLIBS_DIR` hereafter. Appending dylib path to `CMAKE_BUILD_RPATH` will be needed for datatoc etc if linked against one (instead of copying the dylibs around). Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D11997
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c6408bee2c..b7dfb56ff02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,10 @@ if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
+# Install CODE|SCRIPT allow the use of generator expressions.
+if(POLICY CMP0087)
+ cmake_policy(SET CMP0087 NEW)
+endif()
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)