diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-20 00:11:40 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-20 15:41:53 +0200 |
commit | 57e18911d0af62f7cdec8833cf064ecb9d7ed92c (patch) | |
tree | 00f78660a187ab827d91285a6efdc04643dc7473 /CMakeLists.txt | |
parent | 6164edb07f1f0e0c13e5e43373e6bf08b48d99bb (diff) |
Fix warnings from missing optional modules
Don't try to add AxContainer and DBus on platforms where those are not
relevant.
Change-Id: Ibfa9845df59fbe2e5036207018bc1893f07e88d9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c9f55b6d1..72b838c96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,17 @@ set(QT_REPO_NOT_WARNINGS_CLEAN TRUE) # Make sure we only use latest private CMake API, aka no compatibility wrappers. set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE) +# add platform specific compontents +set(optional_components "") +if(WIN32) + list(APPEND optional_components AxContainer) + else() + list(APPEND optional_components DBus) +endif() + find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network) -find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS AxContainer DBus Xml Widgets Quick QuickWidgets QmlDevTools Sql PrintSupport OpenGL OpenGLWidgets) +find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Xml Widgets Quick QuickWidgets QmlDevTools + Sql PrintSupport OpenGL OpenGLWidgets ${optional_components}) # special case end qt_build_repo() |