From 5c2e5da97e48769721c9582e780e39599456e276 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 10 Nov 2023 10:10:41 +0000 Subject: [PATCH] CMakeLists.txt: move camera_shaders to camera-qml target * fixes build with qt 6.6 which checks that the target exists after: https://github.com/qt/qtshadertools/commit/ba3405014b8346e06aa854b491a97c7aca097091 * fixes: | CMake Error at /OE/build/luneos-kirkstone/tmp-glibc/work/core2-64-webos-linux/org.webosports.app.camera/0.0.2-1+gitAUTOINC+fbcbee642d-r0/recipe-sysroot/usr/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:1773 (get_target_property): | get_target_property() called with non-existent target | "org.webosports.app.camera". | Call Stack (most recent call first): | /OE/build/luneos-kirkstone/tmp-glibc/work/core2-64-webos-linux/org.webosports.app.camera/0.0.2-1+gitAUTOINC+fbcbee642d-r0/recipe-sysroot-native/usr/lib/cmake/Qt6ShaderToolsTools/Qt6ShaderToolsMacros.cmake:93 (_qt_internal_expose_source_file_to_ide) | /OE/build/luneos-kirkstone/tmp-glibc/work/core2-64-webos-linux/org.webosports.app.camera/0.0.2-1+gitAUTOINC+fbcbee642d-r0/recipe-sysroot-native/usr/lib/cmake/Qt6ShaderToolsTools/Qt6ShaderToolsMacros.cmake:280 (_qt_internal_add_shaders_impl) | CMakeLists.txt:56 (qt6_add_shaders) Signed-off-by: Martin Jansa --- CMakeLists.txt | 5 ----- CameraApp/CMakeLists.txt | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b023e98..21a4f29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,9 +53,4 @@ install(DIRECTORY qml DESTINATION ${APP_DIR}) file(GLOB_RECURSE NON_COMPILED_FILES *.qml *.js *.svg *.png *.json *.sci qmldir) add_custom_target(NON_COMPILED_TARGET ALL SOURCES ${NON_COMPILED_FILES}) -qt6_add_shaders(org.webosports.app.camera "camera_shaders" - FILES - "qml/components/cornershader.frag" -) - add_subdirectory(CameraApp) diff --git a/CameraApp/CMakeLists.txt b/CameraApp/CMakeLists.txt index 1b6de23..19ed762 100644 --- a/CameraApp/CMakeLists.txt +++ b/CameraApp/CMakeLists.txt @@ -33,3 +33,7 @@ target_link_libraries(camera-qml install(TARGETS camera-qml DESTINATION ${PLUGIN_DIR}) install(FILES qmldir DESTINATION ${PLUGIN_DIR}) +qt6_add_shaders(camera-qml "camera_shaders" + FILES + "qml/components/cornershader.frag" +)