aboutsummaryrefslogtreecommitdiffstats
path: root/demo
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 /demo
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 'demo')
-rw-r--r--demo/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
index 03c19d3..d2158cb 100644
--- a/demo/CMakeLists.txt
+++ b/demo/CMakeLists.txt
@@ -12,7 +12,7 @@ qt_add_qml_module(
# Executable goes to bin/ to avoid clashing with the QML module directory
set_target_properties(BobinkDemo PROPERTIES RUNTIME_OUTPUT_DIRECTORY
- "${CMAKE_BINARY_DIR}/bin")
+ "${PROJECT_BINARY_DIR}/bin")
target_link_libraries(BobinkDemo PRIVATE Qt6::Quick BobinkQtOpcUaplugin)