From c682d78ac27c144c7309954d3d864932a5642237 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 5 Dec 2022 11:44:23 +0100 Subject: [PATCH] CMake: Fix examples/widgets/painting/shared library This library deliberately links PUBLICly against Qt6::Widgets and Qt6::OpenGL. Same for the target_include_directories call. This partially reverts a5de12f0d7dfef64453b7b29c33dc760b3cacec4. This fixes the builds of examples using this library. Change-Id: I2b5791044afc82e71df4a3bbfc26e5b1ab9afa76 Reviewed-by: Alexandru Croitor --- examples/widgets/painting/shared/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/widgets/painting/shared/CMakeLists.txt b/examples/widgets/painting/shared/CMakeLists.txt index c14e648e40..f3d6fd49de 100644 --- a/examples/widgets/painting/shared/CMakeLists.txt +++ b/examples/widgets/painting/shared/CMakeLists.txt @@ -11,15 +11,15 @@ target_sources(painting_shared PRIVATE ${moc_files} ) -target_link_libraries(painting_shared PRIVATE Qt6::Widgets) -target_include_directories(painting_shared PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") +target_link_libraries(painting_shared PUBLIC Qt6::Widgets) +target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") ## Scopes: ##################################################################### if (TARGET Qt6::OpenGL OR QT_FEATURE_opengles2) target_compile_definitions(painting_shared PRIVATE QT_OPENGL_SUPPORT) - target_link_libraries(painting_shared PRIVATE + target_link_libraries(painting_shared PUBLIC Qt6::OpenGL ) qt6_wrap_cpp(moc_files_gl fbopaintdevice.h) # no automoc for OBJECT libs