[Bf-blender-cvs] [cd0acba330e] master: CMake: Support external callback in configuration

Ankit Meel noreply at git.blender.org
Wed Jan 19 19:46:15 CET 2022


Commit: cd0acba330eb7dd2f39dd3ee218cc793f1956a2a
Author: Ankit Meel
Date:   Thu Jan 20 00:15:09 2022 +0530
Branches: master
https://developer.blender.org/rBcd0acba330eb7dd2f39dd3ee218cc793f1956a2a

CMake: Support external callback in configuration

An external CMake script can be used to debug CMake code, modify/read
target properties, inter-target dependencies, non-cache variables etc.

Reviewed by: LazyDodo, brecht
Differential Revision: https://developer.blender.org/D13830

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

M	CMakeLists.txt

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8af43d36916..25cdd122a7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -711,6 +711,9 @@ endif()
 set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
 mark_as_advanced(POSTINSTALL_SCRIPT)
 
+set(POSTCONFIGURE_SCRIPT "" CACHE FILEPATH "Run given CMake script as the last step of CMake configuration")
+mark_as_advanced(POSTCONFIGURE_SCRIPT)
+
 # end option(...)
 
 
@@ -2074,3 +2077,8 @@ endif()
 if(0)
   print_all_vars()
 endif()
+
+# Should be the last step of configuration.
+if(POSTCONFIGURE_SCRIPT)
+  include(${POSTCONFIGURE_SCRIPT})
+endif()



More information about the Bf-blender-cvs mailing list