summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-10-23 14:45:37 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-10-29 12:02:25 +0000
commitf73456e18e0fbe959e623c94bd1ebb23769f7e34 (patch)
tree7186e2db12a20c17a2ab043e697d48a92599ab04
parent80edaf92f5f8351ec15f631cb7dc7da136528b60 (diff)
downloadqtx11extras-f73456e18e0fbe959e623c94bd1ebb23769f7e34.tar.gz
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 <alexandru.croitor@qt.io>
-rw-r--r--CMakeLists.txt18
-rw-r--r--coin/module_config.yaml26
-rw-r--r--dependencies.yaml4
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/x11extras/.prev_CMakeLists.txt25
-rw-r--r--src/x11extras/CMakeLists.txt31
-rw-r--r--tests/CMakeLists.txt16
-rw-r--r--tests/auto/CMakeLists.txt6
-rw-r--r--tests/auto/qx11info/CMakeLists.txt21
9 files changed, 148 insertions, 4 deletions
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:<TRUE>:
+# _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:<TRUE>:
+# _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
+)