[Bf-blender-cvs] [bcca36f4e8f] tmp_T72605: Account for other generators, and intermediate directories.

Ankit Meel noreply at git.blender.org
Wed Jun 30 08:35:22 CEST 2021


Commit: bcca36f4e8ff0b2435437293f9724c019c54cb77
Author: Ankit Meel
Date:   Wed Jun 30 11:35:37 2021 +0530
Branches: tmp_T72605
https://developer.blender.org/rBbcca36f4e8ff0b2435437293f9724c019c54cb77

Account for other generators, and intermediate directories.

===================================================================

M	source/creator/CMakeLists.txt

===================================================================

diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index ae634dc50bf..361e7bfc65a 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -1020,18 +1020,20 @@ elseif(APPLE)
   endif()
   execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE}
                   ${EXECUTABLE_OUTPUT_PATH}/Blender.app)
-  execute_process(COMMAND chmod a+rx,u+w ${EXECUTABLE_OUTPUT_PATH}/Blender.app)
-
-  set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
-    OWNER_READ    GROUP_READ    WORLD_READ
-    OWNER_WRITE
-    OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
-  )
+  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
     DESTINATION "."
-    PERMISSIONS ${CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS}
   )
 
   # install release and app files



More information about the Bf-blender-cvs mailing list