summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-23 14:01:00 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-23 14:11:53 +0200
commit878551a146473b15df23c03d2719308fc0a34302 (patch)
tree5a0be7caedc7307a7bb473c56dfffe80f8b493bb
parentbcc3472aa231d0a65351b73ce9c75f7688be6623 (diff)
CMake: Allow specifying custom configure.cmake file for module
This is required for qttools, where the configure.cmake file lives in the top-level source dir, but the module is in src/global. The new CONFIGURE_FILE_PATH option allows specifying a different location for the configure.cmake instead of the default value. Change-Id: I260d7c93dd49337ebe07ae4cc871394da9e9c2c6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--cmake/QtBuild.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 68ef396e00..4c70202d32 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -2341,7 +2341,7 @@ function(qt_add_module target)
# Process arguments:
qt_parse_all_arguments(arg "qt_add_module"
"NO_MODULE_HEADERS;STATIC;DISABLE_TOOLS_EXPORT;EXCEPTIONS;INTERNAL_MODULE;NO_SYNC_QT;NO_PRIVATE_MODULE;HEADER_MODULE;GENERATE_METATYPES;NO_CONFIG_HEADER_FILE;SKIP_DEPENDS_INCLUDE"
- "MODULE_INCLUDE_NAME;CONFIG_MODULE_NAME;PRECOMPILED_HEADER;${__default_target_info_args}"
+ "MODULE_INCLUDE_NAME;CONFIG_MODULE_NAME;PRECOMPILED_HEADER;CONFIGURE_FILE_PATH;${__default_target_info_args}"
"${__default_private_args};${__default_public_args};${__default_private_module_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN})
qt_internal_add_qt_repo_known_module("${target}")
@@ -2676,6 +2676,9 @@ function(qt_add_module target)
endif()
set(configureFile "${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
+ if(arg_CONFIGURE_FILE_PATH)
+ set(configureFile "${arg_CONFIGURE_FILE_PATH}")
+ endif()
if(EXISTS "${configureFile}" AND NOT arg_NO_CONFIG_HEADER_FILE)
qt_feature_module_begin(
LIBRARY "${target}"