summaryrefslogtreecommitdiffstats
path: root/examples/gui
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-02-10 18:31:58 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-02-11 10:19:42 +0100
commitf1ae5ae726cf909e4ee943eae8e09f8aff74bb3e (patch)
tree0035f377344b27ec20aa3e2d9b64eab4d971a42a /examples/gui
parent79da236e76752c1f940036dffffebb8d2a707d66 (diff)
parent3af9d49bb78ac56bff57d1c3867853730f97a8e1 (diff)
Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"
Diffstat (limited to 'examples/gui')
-rw-r--r--examples/gui/analogclock/.prev_CMakeLists.txt34
-rw-r--r--examples/gui/analogclock/CMakeLists.txt18
-rw-r--r--examples/gui/rasterwindow/.prev_CMakeLists.txt34
-rw-r--r--examples/gui/rasterwindow/CMakeLists.txt9
4 files changed, 87 insertions, 8 deletions
diff --git a/examples/gui/analogclock/.prev_CMakeLists.txt b/examples/gui/analogclock/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..b71892d1b8
--- /dev/null
+++ b/examples/gui/analogclock/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from analogclock.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(analogclock LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/gui/analogclock")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+
+add_qt_gui_executable(analogclock
+ ../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
+ main.cpp
+)
+target_include_directories(analogclock PUBLIC
+ ../rasterwindow
+)
+
+target_link_libraries(analogclock PUBLIC
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS analogclock
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/gui/analogclock/CMakeLists.txt b/examples/gui/analogclock/CMakeLists.txt
index 2b727a48db..d5605ab8ba 100644
--- a/examples/gui/analogclock/CMakeLists.txt
+++ b/examples/gui/analogclock/CMakeLists.txt
@@ -3,7 +3,6 @@
cmake_minimum_required(VERSION 3.14)
project(analogclock LANGUAGES CXX)
-find_package(Qt6 COMPONENTS Widgets) # special case: add
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -11,22 +10,31 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/gui/gui_analogclock") # special case
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets) # special case: add
add_qt_gui_executable(gui_analogclock # special case: renamed target
../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
main.cpp
)
-target_include_directories(gui_analogclock PUBLIC
+target_include_directories(gui_analogclock PUBLIC # special case
../rasterwindow
)
# special case begin
-target_link_libraries(gui_analogclock PUBLIC
+target_link_libraries(gui_analogclock PUBLIC # special case
Qt::Gui
)
# special case end
-install(TARGETS gui_analogclock
+target_link_libraries(gui_analogclock PUBLIC # special case
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS gui_analogclock # special case
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/gui/rasterwindow/.prev_CMakeLists.txt b/examples/gui/rasterwindow/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..3f27ea597c
--- /dev/null
+++ b/examples/gui/rasterwindow/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from rasterwindow.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(rasterwindow LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/gui/rasterwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+
+add_qt_gui_executable(rasterwindow
+ main.cpp
+ rasterwindow.cpp rasterwindow.h
+)
+target_include_directories(rasterwindow PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+target_link_libraries(rasterwindow PUBLIC
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS rasterwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/gui/rasterwindow/CMakeLists.txt b/examples/gui/rasterwindow/CMakeLists.txt
index dd1bcf4f3b..555578725e 100644
--- a/examples/gui/rasterwindow/CMakeLists.txt
+++ b/examples/gui/rasterwindow/CMakeLists.txt
@@ -11,7 +11,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/gui/rasterwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
add_qt_gui_executable(rasterwindow
main.cpp
@@ -20,11 +23,11 @@ add_qt_gui_executable(rasterwindow
target_include_directories(rasterwindow PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
-# special case begin
target_link_libraries(rasterwindow PUBLIC
+ Qt::Core
Qt::Gui
)
-# special case end
+
install(TARGETS rasterwindow
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"