diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-02-24 14:10:08 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-02-25 15:43:15 +0100 |
commit | ae9f0aa86aba649f2cbde832d5519b7804fd5c0c (patch) | |
tree | 4ee166a04f1e291eb4d581f465b60a6aee942f36 /cmake | |
parent | 5838d1f6c357e2c4f298cae8277b9493d628593e (diff) |
CMake: Allow creation of modules with no qtfoo-config.h file
Useful for header only modules that are declared in the same directory
as a regular module, but which doesn't have any features and thus has
no qtfoo-config.h file.
Will be used for the qtzlib module, which is built when system_zlib
feature is disabled.
Change-Id: I60c5f73c3e2a3a481a16c5872e06d5d109a04b10
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 7f1bdd0ac7..7941bcbe16 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1561,7 +1561,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_MODULE_HEADERS;STATIC;DISABLE_TOOLS_EXPORT;EXCEPTIONS;INTERNAL_MODULE;NO_SYNC_QT;NO_PRIVATE_MODULE;HEADER_MODULE;GENERATE_METATYPES;NO_CONFIG_HEADER_FILE" "CONFIG_MODULE_NAME;PRECOMPILED_HEADER" "${__default_private_args};${__default_public_args};${__default_private_module_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN}) @@ -1803,7 +1803,7 @@ function(qt_add_module target) endif() set(configureFile "${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake") - if(EXISTS "${configureFile}") + if(EXISTS "${configureFile}" AND NOT arg_NO_CONFIG_HEADER_FILE) qt_feature_module_begin( LIBRARY "${target}" PUBLIC_FILE "qt${arg_CONFIG_MODULE_NAME}-config.h" |