summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/notifications/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webenginewidgets/notifications/CMakeLists.txt')
-rw-r--r--examples/webenginewidgets/notifications/CMakeLists.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/examples/webenginewidgets/notifications/CMakeLists.txt b/examples/webenginewidgets/notifications/CMakeLists.txt
new file mode 100644
index 000000000..6a201e7e7
--- /dev/null
+++ b/examples/webenginewidgets/notifications/CMakeLists.txt
@@ -0,0 +1,54 @@
+cmake_minimum_required(VERSION 3.18)
+project(notifications 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/notifications")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS WebEngineWidgets)
+
+qt_add_executable(notifications
+ main.cpp
+ notificationpopup.h
+)
+set_target_properties(notifications PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(notifications PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::WebEngineWidgets
+)
+
+
+# Resources:
+set(data_resource_files
+ "icon.png"
+ "index.html"
+)
+
+qt6_add_resources(notifications "data"
+ PREFIX
+ "/"
+ BASE
+ "data"
+ FILES
+ ${data_resource_files}
+)
+
+install(TARGETS notifications
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)