diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2020-06-09 13:54:23 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2020-06-09 14:37:08 +0200 |
commit | 09cb3a30900353dea710cf7d614087c0718dce52 (patch) | |
tree | b75c1deb1ae9620a28b51951e759bdb8d5b5f5e3 /CMakeLists.txt | |
parent | cab749b614d1f5485c1d00204f1a14c81212eda9 (diff) | |
download | qtwayland-09cb3a30900353dea710cf7d614087c0718dce52.tar.gz |
Fix top-level build with qtwayland in some cases
On Windows (at least for me locally) it fails the build because
ThemeSupport cannot be found and cmake doesn't know how to build it.
This breaks the whole top-level build. In any case this module
won't be built on windows because it doesn't pass the preconditions.
Also regenerate the top directory CMakeLists.txt
Change-Id: Ibf2afb5d7780660cac7944d977097795a6cf5307
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 96d72739..1617721d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.15.0) include(.cmake.conf) project(QtWayland # special case - VERSION 6.0.0 + VERSION "${QT_REPO_MODULE_VERSION}" DESCRIPTION "Qt Wayland Libraries" # special case HOMEPAGE_URL "https://qt.io/" LANGUAGES CXX C @@ -21,8 +21,17 @@ set(QT_REPO_NOT_WARNINGS_CLEAN TRUE) # so that standalone tests configure successfully. set(QT_FIND_PACKAGE_DISABLE_DEBUG_BEHAVIOR TRUE) +# Find BuildInternals first by itself because it defines QNX find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals +) + +if(NOT MACOS AND NOT QNX AND (ANDROID OR NOT LINUX)) + message(NOTICE "Skipping the build as the condition \"LINUX OR MACOS OR QNX\" is not met.") + return() +endif() + +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Core Gui EventDispatcherSupport @@ -41,10 +50,6 @@ find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS ) # special case end -if(NOT MACOS AND NOT QNX AND (ANDROID OR NOT LINUX)) - message(NOTICE "Skipping the build as the condition \"LINUX OR MACOS OR QNX\" is not met.") - return() -endif() if(NOT TARGET Qt::Gui) message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\" is not met.") return() |