summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-05-25 02:22:29 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-05-25 02:22:29 +0200
commitdc88ab2c2ccccf037e278abd18278d8c10019e11 (patch)
tree1fae0b0a757c0ff95868c5c7f215cf9a428a8ea0
parent639294f9627de22e91e016d81329a532d65ea8f4 (diff)
downloadcmake-dc88ab2c.tar.gz
cmake-dc88ab2c.zip
tde_uic: Set CMAKE_MODULE_PATH only if it is needed. This prevents CMP0017.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/TDEMacros.cmake1
-rw-r--r--modules/tde_uic.cmake4
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 92527b2..411f38a 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -425,7 +425,6 @@ macro( tde_add_ui_files _sources )
-DUI_FILE:FILEPATH=${_ui_absolute_path}
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR}
-DMASTER_BINARY_DIR:FILEPATH=${CMAKE_BINARY_DIR}
- -DTDE_CMAKE_MODULES:FILEPATH=${TDE_CMAKE_MODULES}
-P ${TDE_CMAKE_MODULES}/tde_uic.cmake
DEPENDS ${_ui_absolute_path} )
diff --git a/modules/tde_uic.cmake b/modules/tde_uic.cmake
index 0b5421d..ebe7d14 100644
--- a/modules/tde_uic.cmake
+++ b/modules/tde_uic.cmake
@@ -9,7 +9,9 @@
#
#################################################
-set( CMAKE_MODULE_PATH "${TDE_CMAKE_MODULES}" )
+if( NOT ${CMAKE_CURRENT_LIST_DIR} STREQUAL ${CMAKE_ROOT}/Modules )
+ set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" )
+endif()
include( TDEMacros )
get_filename_component( _ui_basename ${UI_FILE} NAME_WE )