summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/painterpaths/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/painting/painterpaths/CMakeLists.txt')
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 0631f5ed01..7ae6f0a016 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/painterpaths")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(painterpaths
@@ -19,9 +21,17 @@ add_qt_gui_executable(painterpaths
window.cpp window.h
)
target_link_libraries(painterpaths PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS)
+ target_link_libraries(painterpaths PUBLIC
+ m
+ )
+endif()
+
install(TARGETS painterpaths
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"