From f73456e18e0fbe959e623c94bd1ebb23769f7e34 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 23 Oct 2019 14:45:37 +0200 Subject: Port to CMake Also removed dependencies.yaml to fix the build as that's not used in wip/cmake yet. Fixes: QTBUG-78170 Change-Id: Ibe3a9bb5ddc7d3b4bf979847af6ad3467bf2d866 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- CMakeLists.txt | 18 ++++++++++++++++++ coin/module_config.yaml | 26 ++++++++++++++++++++++++++ dependencies.yaml | 4 ---- src/CMakeLists.txt | 5 +++++ src/x11extras/.prev_CMakeLists.txt | 25 +++++++++++++++++++++++++ src/x11extras/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ tests/CMakeLists.txt | 16 ++++++++++++++++ tests/auto/CMakeLists.txt | 6 ++++++ tests/auto/qx11info/CMakeLists.txt | 21 +++++++++++++++++++++ 9 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 coin/module_config.yaml delete mode 100644 dependencies.yaml create mode 100644 src/CMakeLists.txt create mode 100644 src/x11extras/.prev_CMakeLists.txt create mode 100644 src/x11extras/CMakeLists.txt create mode 100644 tests/CMakeLists.txt create mode 100644 tests/auto/CMakeLists.txt create mode 100644 tests/auto/qx11info/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5dd8a1b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qtx11extras.pro. + +cmake_minimum_required(VERSION 3.15.0) + +project(QtX11Extras + VERSION 6.0.0 + DESCRIPTION "Qt X11Extras Libraries" + HOMEPAGE_URL "https://qt.io/" + LANGUAGES CXX C +) + +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Gui) + +if(NOT TARGET Qt::Gui) + message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\" is not met.") + return() +endif() +qt_build_repo() diff --git a/coin/module_config.yaml b/coin/module_config.yaml new file mode 100644 index 0000000..4b871ab --- /dev/null +++ b/coin/module_config.yaml @@ -0,0 +1,26 @@ +version: 1 +accept_configuration: + condition: property + property: host.os + equals_property: target.os + +build_instructions: + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + - !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml" + - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" + +test_instructions: + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml" + enable_if: + condition: property + property: host.os + equals_value: Linux + - type: EnvironmentVariable + variableName: Dummy + variableValue: dummy + disable_if: + condition: property + property: host.os + equals_value: Linux diff --git a/dependencies.yaml b/dependencies.yaml deleted file mode 100644 index ad294bb..0000000 --- a/dependencies.yaml +++ /dev/null @@ -1,4 +0,0 @@ -dependencies: - ../qtbase: - ref: d225f73c09d3fa8a4699f03d67c5d8a7838357d5 - required: true diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..0229ac5 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from src.pro. + +if(QT_FEATURE_xcb) + add_subdirectory(x11extras) +endif() diff --git a/src/x11extras/.prev_CMakeLists.txt b/src/x11extras/.prev_CMakeLists.txt new file mode 100644 index 0000000..594d688 --- /dev/null +++ b/src/x11extras/.prev_CMakeLists.txt @@ -0,0 +1,25 @@ +# Generated from x11extras.pro. + +##################################################################### +## X11Extras Module: +##################################################################### + +add_qt_module(X11Extras + SOURCES + qx11info_x11.cpp qx11info_x11.h + DEFINES + QT_NO_USING_NAMESPACE + LIBRARIES + Qt::GuiPrivate + XCB::XCB_nolink + PUBLIC_LIBRARIES + Qt::Core + Qt::Gui +) + +#### Keys ignored in scope 1:.:.:x11extras.pro:: +# _LOADED = "qt_module" +add_qt_docs(X11Extras + doc/qtx11extras.qdocconf +) + diff --git a/src/x11extras/CMakeLists.txt b/src/x11extras/CMakeLists.txt new file mode 100644 index 0000000..2bd7dd6 --- /dev/null +++ b/src/x11extras/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from x11extras.pro. + +# begin special case +if(NOT TARGET XCB::XCB) + qt_find_package(XCB REQUIRED PROVIDED_TARGETS XCB::XCB) +endif() +# end special case + +##################################################################### +## X11Extras Module: +##################################################################### + +add_qt_module(X11Extras + SOURCES + qx11info_x11.cpp qx11info_x11.h + DEFINES + QT_NO_USING_NAMESPACE + LIBRARIES + Qt::GuiPrivate + XCB::XCB_nolink + PUBLIC_LIBRARIES + Qt::Core + Qt::Gui +) + +#### Keys ignored in scope 1:.:.:x11extras.pro:: +# _LOADED = "qt_module" +add_qt_docs(X11Extras + doc/qtx11extras.qdocconf +) + diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..1930dcb --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from tests.pro. + +if(NOT TARGET Qt::Test) + cmake_minimum_required(VERSION 3.15.0) + project(QtX11ExtrasTests VERSION 6.0.0 LANGUAGES C CXX) + find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core Gui Widgets Test X11Extras) # special case + qt_set_up_standalone_tests_build() +endif() + +find_package(Qt6 ${PROJECT_VERSION} COMPONENTS Widgets) # special case + +# special case begin +if(QT_FEATURE_xcb) +qt_build_tests() +endif() +# special case end diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt new file mode 100644 index 0000000..926fc62 --- /dev/null +++ b/tests/auto/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from auto.pro. + +# add_subdirectory(cmake) # special case +if(TARGET Qt::Widgets) + add_subdirectory(qx11info) +endif() diff --git a/tests/auto/qx11info/CMakeLists.txt b/tests/auto/qx11info/CMakeLists.txt new file mode 100644 index 0000000..042e007 --- /dev/null +++ b/tests/auto/qx11info/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from qx11info.pro. + +# begin special case +if(NOT TARGET XCB::XCB) + qt_find_package(XCB REQUIRED PROVIDED_TARGETS XCB::XCB) +endif() +# end special case + +##################################################################### +## tst_qx11info Test: +##################################################################### + +add_qt_test(tst_qx11info + SOURCES + tst_qx11info.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Widgets + Qt::X11Extras + XCB::XCB +) -- cgit v1.2.1