summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/contentmanipulation
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-02-10 17:03:01 +0100
committerMichal Klocek <michal.klocek@qt.io>2021-05-22 14:10:08 +0200
commitdd523573f2981cc58d4da0ec6e2b061a6172a8eb (patch)
tree77f190fbe00e111362711ce14be00117a3cb7a91 /examples/webenginewidgets/contentmanipulation
parente1e6e4c90071a7e4e7a12b9f529ca1da6d71e0c1 (diff)
Add examples to the cmake build
Add only quick and widget examples to the build for now. Update examples qmake files so the ci can also build qmake examples after the cmake bulid. Note this patch breakes qmake builds. Task-number: QTBUG-91760 Change-Id: Ia867a49bc3deab1967bdedcf525ad4afe3967c2a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples/webenginewidgets/contentmanipulation')
-rw-r--r--examples/webenginewidgets/contentmanipulation/CMakeLists.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/examples/webenginewidgets/contentmanipulation/CMakeLists.txt b/examples/webenginewidgets/contentmanipulation/CMakeLists.txt
new file mode 100644
index 000000000..13986389d
--- /dev/null
+++ b/examples/webenginewidgets/contentmanipulation/CMakeLists.txt
@@ -0,0 +1,51 @@
+cmake_minimum_required(VERSION 3.18)
+project(contentmanipulation 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}/webenginewidgets/contentmanipulation")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS WebEngineWidgets)
+
+qt_add_executable(contentmanipulation
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+set_target_properties(contentmanipulation PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(contentmanipulation PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::WebEngineWidgets
+)
+
+
+# Resources:
+set(jquery_resource_files
+ "jquery.min.js"
+)
+
+qt6_add_resources(contentmanipulation "jquery"
+ PREFIX
+ "/"
+ FILES
+ ${jquery_resource_files}
+)
+
+install(TARGETS contentmanipulation
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)