summaryrefslogtreecommitdiffstats
path: root/examples/webengine/customdialogs/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webengine/customdialogs/CMakeLists.txt')
-rw-r--r--examples/webengine/customdialogs/CMakeLists.txt76
1 files changed, 76 insertions, 0 deletions
diff --git a/examples/webengine/customdialogs/CMakeLists.txt b/examples/webengine/customdialogs/CMakeLists.txt
new file mode 100644
index 000000000..d6d69548f
--- /dev/null
+++ b/examples/webengine/customdialogs/CMakeLists.txt
@@ -0,0 +1,76 @@
+cmake_minimum_required(VERSION 3.18)
+project(customdialogs 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}/webengine/customdialogs")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS WebEngineQuick)
+
+qt_add_executable(customdialogs
+ main.cpp
+ server.cpp server.h
+)
+set_target_properties(customdialogs PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(customdialogs PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::WebEngineQuick
+)
+
+
+# Resources:
+set(customdialogs_resource_files
+ "MessageRectangle.qml"
+ "SwitchButton.qml"
+ "WebView.qml"
+ "forms/Authentication.qml"
+ "forms/AuthenticationForm.ui.qml"
+ "forms/Button.qml"
+ "forms/ColorCell.qml"
+ "forms/ColorPicker.qml"
+ "forms/ColorPickerForm.ui.qml"
+ "forms/FilePicker.qml"
+ "forms/FilePickerForm.ui.qml"
+ "forms/FileRow.qml"
+ "forms/JavaScript.qml"
+ "forms/JavaScriptForm.ui.qml"
+ "forms/Menu.qml"
+ "forms/MenuForm.ui.qml"
+ "icon.svg"
+ "index.html"
+ "main.qml"
+ "style.css"
+)
+
+qt6_add_resources(customdialogs "customdialogs"
+ PREFIX
+ "/"
+ FILES
+ ${customdialogs_resource_files}
+)
+
+if(TARGET Qt::Widgets)
+ target_link_libraries(customdialogs PUBLIC
+ Qt::Widgets
+ )
+endif()
+
+install(TARGETS customdialogs
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)