[Bf-blender-cvs] [671b6d41c40] master: CMake: Fix Blender.app creation/modification time
Sergey Sharybin
noreply at git.blender.org
Thu Mar 26 11:37:46 CET 2020
Commit: 671b6d41c408d8cf16bf9a1d0cb38dfa185c61b9
Author: Sergey Sharybin
Date: Thu Mar 26 11:34:50 2020 +0100
Branches: master
https://developer.blender.org/rB671b6d41c408d8cf16bf9a1d0cb38dfa185c61b9
CMake: Fix Blender.app creation/modification time
It was failing on first run of CMake since the Blender.app is not yet
created.
===================================================================
M source/creator/CMakeLists.txt
===================================================================
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 720e26b24e2..ced0532a8fa 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -921,6 +921,11 @@ elseif(APPLE)
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Give the bundle actual creation/modification date
+ #
+ # Note that the directory might not yet exist, which happens when CMake is first run.
+ if(NOT EXISTS ${EXECUTABLE_OUTPUT_PATH}/Blender.app)
+ file(MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/Blender.app)
+ endif()
execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE}
${EXECUTABLE_OUTPUT_PATH}/Blender.app)
More information about the Bf-blender-cvs
mailing list