summaryrefslogtreecommitdiffstats
path: root/examples/embedded
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/embedded
parent79da236e76752c1f940036dffffebb8d2a707d66 (diff)
parent3af9d49bb78ac56bff57d1c3867853730f97a8e1 (diff)
Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"
Diffstat (limited to 'examples/embedded')
-rw-r--r--examples/embedded/digiflip/CMakeLists.txt7
-rw-r--r--examples/embedded/flickable/CMakeLists.txt7
-rw-r--r--examples/embedded/flightinfo/.prev_CMakeLists.txt47
-rw-r--r--examples/embedded/flightinfo/CMakeLists.txt21
-rw-r--r--examples/embedded/lightmaps/CMakeLists.txt7
-rw-r--r--examples/embedded/raycasting/CMakeLists.txt21
-rw-r--r--examples/embedded/styleexample/.prev_CMakeLists.txt52
-rw-r--r--examples/embedded/styleexample/CMakeLists.txt28
8 files changed, 181 insertions, 9 deletions
diff --git a/examples/embedded/digiflip/CMakeLists.txt b/examples/embedded/digiflip/CMakeLists.txt
index f5557766ad..cfad2a7c7b 100644
--- a/examples/embedded/digiflip/CMakeLists.txt
+++ b/examples/embedded/digiflip/CMakeLists.txt
@@ -9,16 +9,21 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/digiflip")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(digiflip
digiflip.cpp
)
target_link_libraries(digiflip PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS digiflip
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/flickable/CMakeLists.txt b/examples/embedded/flickable/CMakeLists.txt
index bd435d1352..bae3146723 100644
--- a/examples/embedded/flickable/CMakeLists.txt
+++ b/examples/embedded/flickable/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/embedded/flickable")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(flickable
@@ -18,8 +20,11 @@ add_qt_gui_executable(flickable
main.cpp
)
target_link_libraries(flickable PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS flickable
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/flightinfo/.prev_CMakeLists.txt b/examples/embedded/flightinfo/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f7898e8ed8
--- /dev/null
+++ b/examples/embedded/flightinfo/.prev_CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from flightinfo.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(flightinfo LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/embedded/flightinfo")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Network)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(flightinfo
+ flightinfo.cpp
+ form.ui
+)
+target_link_libraries(flightinfo PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Network
+ Qt::Widgets
+)
+
+
+# Resources:
+set(flightinfo_resource_files
+ "aircraft.png"
+)
+
+qt6_add_resources(flightinfo "flightinfo"
+ PREFIX
+ "/"
+ FILES
+ ${flightinfo_resource_files}
+)
+
+install(TARGETS flightinfo
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/embedded/flightinfo/CMakeLists.txt b/examples/embedded/flightinfo/CMakeLists.txt
index b2d7695c37..f7898e8ed8 100644
--- a/examples/embedded/flightinfo/CMakeLists.txt
+++ b/examples/embedded/flightinfo/CMakeLists.txt
@@ -9,20 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/flightinfo")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(flightinfo
flightinfo.cpp
form.ui
- flightinfo.qrc # special case: add
)
target_link_libraries(flightinfo PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
+
+# Resources:
+set(flightinfo_resource_files
+ "aircraft.png"
+)
+
+qt6_add_resources(flightinfo "flightinfo"
+ PREFIX
+ "/"
+ FILES
+ ${flightinfo_resource_files}
+)
+
install(TARGETS flightinfo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/lightmaps/CMakeLists.txt b/examples/embedded/lightmaps/CMakeLists.txt
index 775c12be66..641f75c3c8 100644
--- a/examples/embedded/lightmaps/CMakeLists.txt
+++ b/examples/embedded/lightmaps/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/embedded/lightmaps")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -21,9 +23,12 @@ add_qt_gui_executable(lightmaps
slippymap.cpp slippymap.h
)
target_link_libraries(lightmaps PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
install(TARGETS lightmaps
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/raycasting/CMakeLists.txt b/examples/embedded/raycasting/CMakeLists.txt
index 0b48de26a5..86a3042f86 100644
--- a/examples/embedded/raycasting/CMakeLists.txt
+++ b/examples/embedded/raycasting/CMakeLists.txt
@@ -9,17 +9,34 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/raycasting")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(raycasting
- raycasting.cpp raycasting.qrc
+ raycasting.cpp
)
target_link_libraries(raycasting PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(raycasting_resource_files
+ "textures.png"
+)
+
+qt6_add_resources(raycasting "raycasting"
+ PREFIX
+ "/"
+ FILES
+ ${raycasting_resource_files}
+)
+
install(TARGETS raycasting
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/styleexample/.prev_CMakeLists.txt b/examples/embedded/styleexample/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ac03e58346
--- /dev/null
+++ b/examples/embedded/styleexample/.prev_CMakeLists.txt
@@ -0,0 +1,52 @@
+# Generated from styleexample.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(styleexample LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/embedded/styleexample")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(styleexample
+ main.cpp
+ stylewidget.cpp stylewidget.h stylewidget.ui
+)
+target_link_libraries(styleexample PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(styleexample_resource_files
+ "files/add.png"
+ "files/application.qss"
+ "files/blue.qss"
+ "files/khaki.qss"
+ "files/nature_1.jpg"
+ "files/nostyle.qss"
+ "files/remove.png"
+ "files/transparent.qss"
+)
+
+qt6_add_resources(styleexample "styleexample"
+ PREFIX
+ "/"
+ FILES
+ ${styleexample_resource_files}
+)
+
+install(TARGETS styleexample
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/embedded/styleexample/CMakeLists.txt b/examples/embedded/styleexample/CMakeLists.txt
index a0ec3d738a..ac03e58346 100644
--- a/examples/embedded/styleexample/CMakeLists.txt
+++ b/examples/embedded/styleexample/CMakeLists.txt
@@ -9,18 +9,42 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/styleexample")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(styleexample
main.cpp
stylewidget.cpp stylewidget.h stylewidget.ui
- styleexample.qrc # special case: add
)
target_link_libraries(styleexample PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+
+# Resources:
+set(styleexample_resource_files
+ "files/add.png"
+ "files/application.qss"
+ "files/blue.qss"
+ "files/khaki.qss"
+ "files/nature_1.jpg"
+ "files/nostyle.qss"
+ "files/remove.png"
+ "files/transparent.qss"
+)
+
+qt6_add_resources(styleexample "styleexample"
+ PREFIX
+ "/"
+ FILES
+ ${styleexample_resource_files}
+)
+
install(TARGETS styleexample
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"