diff options
author | Ankit Meel <ankitjmeel@gmail.com> | 2022-01-19 21:45:09 +0300 |
---|---|---|
committer | Ankit Meel <ankitjmeel@gmail.com> | 2022-01-19 21:45:09 +0300 |
commit | cd0acba330eb7dd2f39dd3ee218cc793f1956a2a (patch) | |
tree | f3d2df9c492176c0832a47f81d287d1c3e2ec69f /CMakeLists.txt | |
parent | 17cab47ed10a99818f9cdd15657c1231e312da25 (diff) |
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
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() |