diff options
Diffstat (limited to 'examples/corelib/threads')
4 files changed, 22 insertions, 4 deletions
diff --git a/examples/corelib/threads/mandelbrot/CMakeLists.txt b/examples/corelib/threads/mandelbrot/CMakeLists.txt index 6905429559..515eb3ed93 100644 --- a/examples/corelib/threads/mandelbrot/CMakeLists.txt +++ b/examples/corelib/threads/mandelbrot/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/corelib/threads/mandelbrot") +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) add_qt_gui_executable(mandelbrot @@ -19,8 +21,17 @@ add_qt_gui_executable(mandelbrot renderthread.cpp renderthread.h ) target_link_libraries(mandelbrot PUBLIC + Qt::Core + Qt::Gui Qt::Widgets ) + +if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS) + target_link_libraries(mandelbrot PUBLIC + m + ) +endif() + install(TARGETS mandelbrot RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt index 78a59ac2dc..cc4ff1bd4a 100644 --- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt +++ b/examples/corelib/threads/queuedcustomtype/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/corelib/threads/queuedcustomtype") +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) add_qt_gui_executable(queuedcustomtype @@ -20,8 +22,11 @@ add_qt_gui_executable(queuedcustomtype window.cpp window.h ) target_link_libraries(queuedcustomtype PUBLIC + Qt::Core + Qt::Gui Qt::Widgets ) + install(TARGETS queuedcustomtype RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/corelib/threads/semaphores/CMakeLists.txt b/examples/corelib/threads/semaphores/CMakeLists.txt index ed36acde55..15b5dc56b9 100644 --- a/examples/corelib/threads/semaphores/CMakeLists.txt +++ b/examples/corelib/threads/semaphores/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/corelib/threads/semaphores") find_package(Qt6 COMPONENTS Core) @@ -19,6 +19,7 @@ add_executable(semaphores target_link_libraries(semaphores PUBLIC Qt::Core ) + install(TARGETS semaphores RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/corelib/threads/waitconditions/CMakeLists.txt b/examples/corelib/threads/waitconditions/CMakeLists.txt index 235cb91cdb..0b6d889d77 100644 --- a/examples/corelib/threads/waitconditions/CMakeLists.txt +++ b/examples/corelib/threads/waitconditions/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/corelib/threads/waitconditions") find_package(Qt6 COMPONENTS Core) @@ -19,6 +19,7 @@ add_executable(waitconditions target_link_libraries(waitconditions PUBLIC Qt::Core ) + install(TARGETS waitconditions RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" |