summaryrefslogtreecommitdiffstats
path: root/examples/webenginequick/lifecycle/CMakeLists.txt
diff options
context:
space:
mode:
authorBalazs Egedi <egedib@inf.u-szeged.hu>2021-08-17 12:59:28 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-13 12:05:52 +0000
commit1eb92daca5b3dbbcdd54a561f5f32c435a4f551f (patch)
treed7f697a4330a60b965f1f7f43aa5e0d7d07fc353 /examples/webenginequick/lifecycle/CMakeLists.txt
parentedd6de237f2f66dc04eebb10782928f9a5b6fb40 (diff)
Rename Quick examples' folder from webengine to webenginequick
Fix webengine directory path in project files and comments Change-Id: I06ed9ee41111e7135fa9feb152ad2a5eb2262b76 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit a32ef7057c01fbcadcf451e7f2b785f7b3dd3942) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/webenginequick/lifecycle/CMakeLists.txt')
-rw-r--r--examples/webenginequick/lifecycle/CMakeLists.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/examples/webenginequick/lifecycle/CMakeLists.txt b/examples/webenginequick/lifecycle/CMakeLists.txt
new file mode 100644
index 000000000..2d7b3e26b
--- /dev/null
+++ b/examples/webenginequick/lifecycle/CMakeLists.txt
@@ -0,0 +1,57 @@
+cmake_minimum_required(VERSION 3.16)
+project(lifecycle LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginequick/lifecycle")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS QuickControls2)
+find_package(Qt6 COMPONENTS WebEngineQuick)
+
+qt_add_executable(lifecycle
+ main.cpp
+)
+set_target_properties(lifecycle PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(lifecycle PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::WebEngineQuick
+)
+
+
+# Resources:
+set(resources_resource_files
+ "WebBrowser.qml"
+ "WebTab.qml"
+ "WebTabBar.qml"
+ "WebTabButton.qml"
+ "WebTabStack.qml"
+ "WebToolButton.qml"
+ "qtquickcontrols2.conf"
+)
+
+qt6_add_resources(lifecycle "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
+install(TARGETS lifecycle
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)