aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-24 17:41:35 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-24 18:18:31 +0100
commit3e8111aaee070dc9b5d51cab3fd44ff88841f63e (patch)
tree887ca52741c8f9b62a950f2670ddfb4bee348c5d /src
parentc47f6a35ea0cb14936bb0d6470d6543965a6b5e2 (diff)
downloadBobinkQtOpcUa-3e8111aaee070dc9b5d51cab3fd44ff88841f63e.tar.gz
BobinkQtOpcUa-3e8111aaee070dc9b5d51cab3fd44ff88841f63e.zip
Make build system usable as a git submodule
Replace CMAKE_SOURCE_DIR/CMAKE_BINARY_DIR with PROJECT_SOURCE_DIR/ PROJECT_BINARY_DIR so paths resolve correctly from add_subdirectory(). Guard global settings (CMAKE_CXX_STANDARD, CMAKE_BUILD_RPATH, qt_standard_project_setup, demo) behind PROJECT_IS_TOP_LEVEL. Export OPEN62541_INSTALL_DIR and QTOPCUA_INSTALL_DIR as CACHE INTERNAL so parent projects can set up RPATH and plugin paths.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b0781cd..0aff9d4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,7 @@ qt_add_qml_module(
OpcUaMonitoredNode.h
OpcUaMonitoredNode.cpp
OUTPUT_DIRECTORY
- "${CMAKE_BINARY_DIR}/qml/Bobink")
+ "${PROJECT_BINARY_DIR}/qml/Bobink")
+target_compile_features(BobinkQtOpcUa PUBLIC cxx_std_17)
target_link_libraries(BobinkQtOpcUa PUBLIC Qt6::Core Qt6::Quick Qt6::OpcUa)