From dc88ab2c2ccccf037e278abd18278d8c10019e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 25 May 2021 02:22:29 +0200 Subject: tde_uic: Set CMAKE_MODULE_PATH only if it is needed. This prevents CMP0017. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- modules/TDEMacros.cmake | 1 - modules/tde_uic.cmake | 4 +++- 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 ) -- cgit v1.2.1