[Bf-blender-cvs] [34a9d0e0670] tmp_T72605: Handle all files, directories and executables.
Ankit Meel
noreply at git.blender.org
Wed Jun 30 11:14:42 CEST 2021
Commit: 34a9d0e06703c85c61935ee105cf441e622f0624
Author: Ankit Meel
Date: Wed Jun 30 14:28:11 2021 +0530
Branches: tmp_T72605
https://developer.blender.org/rB34a9d0e06703c85c61935ee105cf441e622f0624
Handle all files, directories and executables.
===================================================================
M CMakeLists.txt
M source/creator/CMakeLists.txt
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 297e32bd67e..0dfe91ba84e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,11 @@ if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
+# The NEW behavior is to evaluate generator expressions for install(CODE) and install(SCRIPT).
+if(POLICY CMP0087)
+ cmake_policy(SET CMP0087 NEW)
+endif()
+
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 361e7bfc65a..eb8dbef5e71 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -1020,16 +1020,6 @@ elseif(APPLE)
endif()
execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE}
${EXECUTABLE_OUTPUT_PATH}/Blender.app)
- add_custom_command(TARGET blender
- # Ensure that the binary exists.
- POST_BUILD
- # Permissions for all intermediate directories and the Blender binary.
- COMMAND chmod -R a+rx,u+w
- # ${EXECUTABLE_OUTPUT_PATH}/Blender.app is wrong path for Xcode generator.
- "$<TARGET_BUNDLE_DIR:blender>"
- "$<TARGET_BUNDLE_CONTENT_DIR:blender>"
- "$<TARGET_BUNDLE_CONTENT_DIR:blender>/MacOS"
- "$<TARGET_FILE:blender>")
install(
TARGETS blender
@@ -1251,6 +1241,10 @@ endif()
# -----------------------------------------------------------------------------
# Post-install script
+if(APPLE)
+ install(CODE "execute_process(COMMAND chmod -R a+X,a+r,u+w '$<TARGET_BUNDLE_DIR:blender>')")
+endif()
+
if(POSTINSTALL_SCRIPT)
install(SCRIPT ${POSTINSTALL_SCRIPT})
endif()
More information about the Bf-blender-cvs
mailing list