summaryrefslogtreecommitdiffstats
path: root/examples/corelib/serialization/streambookmarks/CMakeLists.txt
diff options
context:
space:
mode:
authorØystein Heskestad <oystein.heskestad@qt.io>2023-03-09 17:01:59 +0100
committerØystein Heskestad <oystein.heskestad@qt.io>2023-03-31 13:26:42 +0200
commit29317b426b9ec84f4ba66e6c032f71c2a2bae091 (patch)
tree40164eb76d8fa5f7c7c128631582ca5c85cf5df7 /examples/corelib/serialization/streambookmarks/CMakeLists.txt
parenta815c40e736d0914b898a896f3dcee454804a7a2 (diff)
Move streambookmarks example into corelibe/serialization
The stream-based XML serialization API resides in corelib/serialization. Move the steambookmarks example there. The Qt XML documentation is updated to no longer refer to this example code directly and refer to the direct location in the example documentation instead. Task-number: QTBUG-110647 Pick-to: 6.5 Change-Id: Id36fb04a6acb7b8d1eb008f61568fe0abc221e3d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'examples/corelib/serialization/streambookmarks/CMakeLists.txt')
-rw-r--r--examples/corelib/serialization/streambookmarks/CMakeLists.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/corelib/serialization/streambookmarks/CMakeLists.txt b/examples/corelib/serialization/streambookmarks/CMakeLists.txt
new file mode 100644
index 0000000000..1d0ab8690b
--- /dev/null
+++ b/examples/corelib/serialization/streambookmarks/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(streambookmarks LANGUAGES CXX)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/streambookmarks")
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
+
+qt_standard_project_setup()
+
+qt_add_executable(streambookmarks
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ xbelreader.cpp xbelreader.h
+ xbelwriter.cpp xbelwriter.h
+)
+
+set_target_properties(streambookmarks PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+target_link_libraries(streambookmarks PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Widgets
+)
+
+install(TARGETS streambookmarks
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)