summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2023-06-02 10:00:03 +0200
committerSlávek Banko <slavek.banko@axis.cz>2023-06-02 13:42:20 +0200
commit3fedede7e61ebe45fc201e3dc1e2bd0b61705d4b (patch)
tree699026cb49d618953a5bcb98f151ee491298b328 /modules
parent4e5ddd484fc887a9b953749de06dfc368741c311 (diff)
downloadtde-cmake-3fedede7e61ebe45fc201e3dc1e2bd0b61705d4b.tar.gz
tde-cmake-3fedede7e61ebe45fc201e3dc1e2bd0b61705d4b.zip
Save and restore CMake policies so that it does not cause CMP0011
in the case of use as a slave - tde_automoc, tde_uic. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit d1c467a7dabf992393da8063606c5f478a974634)
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 0ff4c17..56c9f7f 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -67,6 +67,7 @@ endif()
#####
##### set necessary CMake policies
+cmake_policy( PUSH )
if( POLICY CMP0057 )
# necessary for CheckLinkerFlag
cmake_policy( SET CMP0057 NEW )
@@ -224,9 +225,15 @@ macro( tde_read_src_metadata )
endmacro( tde_read_src_metadata )
+################################################
+#####
+##### finalization as a slave part
+
if( DEFINED MASTER_SOURCE_DIR )
+ cmake_policy( POP )
return( )
endif( )
+
########### slave part ends here ###############
@@ -3217,3 +3224,13 @@ macro( tde_setup_polkit )
endif( )
endmacro( )
+
+
+#################################################
+#####
+##### restore CMake policies
+
+cmake_policy( POP )
+
+
+#################################################