From 5df0735157632cef142f3d7eb3f16d34ee9b3ed4 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 31 Jan 2025 20:56:46 +0100 Subject: [PATCH] qt: add "bridge" project to ask for "a" Qt version --- .gitlab/ci/configure_common.cmake | 1 + projects/qt.cmake | 14 ++++++++++++++ selftest/CMakeLists.txt | 1 + selftest/tests/CMakeLists.txt | 1 + 4 files changed, 17 insertions(+) create mode 100644 projects/qt.cmake diff --git a/.gitlab/ci/configure_common.cmake b/.gitlab/ci/configure_common.cmake index 7200099e3..6cfb8d070 100644 --- a/.gitlab/ci/configure_common.cmake +++ b/.gitlab/ci/configure_common.cmake @@ -153,6 +153,7 @@ enable_project(pythonyarl) enable_project(pytz) enable_project(pywin32) enable_project(qhull) +enable_project(qt) enable_project(qt5) enable_project(qt6) enable_project(rkcommon) diff --git a/projects/qt.cmake b/projects/qt.cmake new file mode 100644 index 000000000..3d596bd0d --- /dev/null +++ b/projects/qt.cmake @@ -0,0 +1,14 @@ +if (qt_enabled AND NOT (qt5_enabled OR qt6_enabled)) + message(FATAL_ERROR + "Qt is enabled, but neither Qt5 nor Qt6 has been enabled.") +endif () + +superbuild_add_dummy_project(qt + DEPENDS_OPTIONAL qt5 qt6) + +set(qt_version) +if (qt5_enabled) + set(qt_version 5) +elseif (qt6_enabled) + set(qt_version 6) +endif () diff --git a/selftest/CMakeLists.txt b/selftest/CMakeLists.txt index 42a71969b..6974c0a49 100644 --- a/selftest/CMakeLists.txt +++ b/selftest/CMakeLists.txt @@ -107,6 +107,7 @@ function (superbuild_find_projects var) pythonyarl pytz qhull + qt qt5 qt6 rkcommon diff --git a/selftest/tests/CMakeLists.txt b/selftest/tests/CMakeLists.txt index a61ec76d0..238b38185 100644 --- a/selftest/tests/CMakeLists.txt +++ b/selftest/tests/CMakeLists.txt @@ -68,6 +68,7 @@ list(REMOVE_ITEM license_projects hdf5cpp mesatoolchainoverride ospraymodulempi + qt # USE_SYSTEM projects openmp -- GitLab