aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-03-11 11:02:24 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-03-11 11:09:40 +0100
commit35309337aacac2eac7d7215e526bddcf7647b8cf (patch)
tree3626e5e5e17e23122deab1bf3ade0502872873f3 /CMakeLists.txt
downloadQtXpl2-35309337aacac2eac7d7215e526bddcf7647b8cf.tar.gz
QtXpl2-35309337aacac2eac7d7215e526bddcf7647b8cf.zip
Initial project setup: Qt 6.10.2 TCP client library for Alchemie XPL2 protocol
- Static library (src/) with QML singleton Xpl2Client for TCP communication - Qt Quick demo app (demo/) with connection UI, command input, and response log
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..bcb1f62
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.16)
+project(QtXpl2 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+find_package(Qt6 6.10.2 REQUIRED COMPONENTS Core Network Qml Quick)
+qt_standard_project_setup()
+qt_policy(SET QTP0001 NEW)
+
+# QML import path so Qt Creator / qmlls can resolve modules.
+list(APPEND QML_IMPORT_PATH "${PROJECT_BINARY_DIR}/qml")
+set(QML_IMPORT_PATH
+ "${QML_IMPORT_PATH}"
+ CACHE STRING "" FORCE)
+
+# Generate .qmlls.ini for QML language server
+set(QT_QML_GENERATE_QMLLS_INI
+ ON
+ CACHE BOOL "")
+
+# Let the demo executable find the library at run time.
+set(CMAKE_BUILD_RPATH "${PROJECT_BINARY_DIR}/qml/Xpl2")
+
+add_subdirectory(src)
+
+if(PROJECT_IS_TOP_LEVEL)
+ add_subdirectory(demo)
+endif()