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>
pull/94/head
Slávek Banko 1 year ago
parent 2e90c1972e
commit d1c467a7da
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -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 )
#################################################

Loading…
Cancel
Save