diff options
Diffstat (limited to 'examples/widgets/painting/shared/CMakeLists.txt')
-rw-r--r-- | examples/widgets/painting/shared/CMakeLists.txt | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/examples/widgets/painting/shared/CMakeLists.txt b/examples/widgets/painting/shared/CMakeLists.txt index 4c7049e01d..5eaa3b42e1 100644 --- a/examples/widgets/painting/shared/CMakeLists.txt +++ b/examples/widgets/painting/shared/CMakeLists.txt @@ -1,7 +1,8 @@ -# special case: Entire file! +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -# special case: add_library(painting_shared OBJECT) +add_library(painting_shared::painting_shared ALIAS painting_shared) qt6_wrap_cpp(moc_files arthurwidgets.h hoverpoints.h) # no automoc for OBJECT libs:-/ target_sources(painting_shared PRIVATE arthurstyle.cpp arthurstyle.h @@ -9,16 +10,8 @@ target_sources(painting_shared PRIVATE hoverpoints.cpp hoverpoints.h ${moc_files} ) -target_link_libraries(painting_shared PUBLIC Qt::Widgets) -target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") -## Scopes: -##################################################################### +set_target_properties(painting_shared PROPERTIES UNITY_BUILD OFF) -if (TARGET Qt::OpenGL OR QT_FEATURE_opengles2) - target_compile_definitions(painting_shared PRIVATE QT_OPENGL_SUPPORT) - target_link_libraries(painting_shared PRIVATE - Qt::OpenGL - Qt::Widgets - ) -endif() +target_link_libraries(painting_shared PUBLIC Qt6::Widgets) +target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") |