From 3e8111aaee070dc9b5d51cab3fd44ff88841f63e Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Tue, 24 Feb 2026 17:41:35 +0100 Subject: 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. --- demo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demo/CMakeLists.txt') 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) -- cgit v1.2.3