From bbf5f0bfd9f97b22b4a7bcb6de8161d264ad1b4c Mon Sep 17 00:00:00 2001 From: Leon Matthes Date: Fri, 6 Dec 2024 17:45:38 +0100 Subject: [PATCH] Fix: Make qml module targets publicly visible As per the CMake documentation, by default IMPORTED targets are only visible within the current directory. This isn't useful behavior in our case, so make it globally accessible. See also: https://cmake.org/cmake/help/latest/command/add_library.html#imported-libraries --- cmake/CxxQt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CxxQt.cmake b/cmake/CxxQt.cmake index d4ddb66..6f6f061 100644 --- a/cmake/CxxQt.cmake +++ b/cmake/CxxQt.cmake @@ -136,7 +136,7 @@ function(cxx_qt_import_qml_module target) DEPENDS ${QML_MODULE_SOURCE_CRATE} BYPRODUCTS "${QML_MODULE_DIR}/plugin_init.o") - add_library(${target} OBJECT IMPORTED) + add_library(${target} OBJECT IMPORTED GLOBAL) set_target_properties(${target} PROPERTIES IMPORTED_OBJECTS "${QML_MODULE_DIR}/plugin_init.o")