2022-07-05 13:26:52 +02:00
|
|
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2024-02-28 11:38:51 +01:00
|
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2022-07-05 13:26:52 +02:00
|
|
|
|
2021-08-16 18:14:46 +02:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2019-06-04 17:08:47 +02:00
|
|
|
project(undoframework LANGUAGES CXX)
|
2019-03-20 13:41:37 +01:00
|
|
|
|
2021-12-02 08:54:27 +01:00
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
2019-06-04 17:08:47 +02:00
|
|
|
|
2022-11-15 22:00:14 +01:00
|
|
|
qt_standard_project_setup()
|
|
|
|
|
2020-10-16 11:55:24 +02:00
|
|
|
qt_add_executable(undoframework
|
2019-06-04 17:08:47 +02:00
|
|
|
commands.cpp commands.h
|
|
|
|
diagramitem.cpp diagramitem.h
|
|
|
|
diagramscene.cpp diagramscene.h
|
|
|
|
main.cpp
|
|
|
|
mainwindow.cpp mainwindow.h
|
|
|
|
)
|
2021-12-08 17:25:35 +01:00
|
|
|
|
2020-10-26 16:22:32 +01:00
|
|
|
set_target_properties(undoframework PROPERTIES
|
|
|
|
WIN32_EXECUTABLE TRUE
|
|
|
|
MACOSX_BUNDLE TRUE
|
|
|
|
)
|
2021-12-08 17:25:35 +01:00
|
|
|
|
2022-11-21 12:03:41 +01:00
|
|
|
target_link_libraries(undoframework PRIVATE
|
2022-11-14 14:49:32 +01:00
|
|
|
Qt6::Core
|
|
|
|
Qt6::Gui
|
|
|
|
Qt6::Widgets
|
2019-06-04 17:08:47 +02:00
|
|
|
)
|
|
|
|
|
2020-02-04 08:15:50 +01:00
|
|
|
# Resources:
|
|
|
|
set(undoframework_resource_files
|
2023-01-09 13:55:09 +01:00
|
|
|
"icons/cross.png"
|
|
|
|
"icons/rectangle.png"
|
|
|
|
"icons/redo.png"
|
|
|
|
"icons/remove.png"
|
|
|
|
"icons/triangle.png"
|
|
|
|
"icons/undo.png"
|
2020-02-04 08:15:50 +01:00
|
|
|
)
|
|
|
|
|
2021-12-08 15:59:33 +01:00
|
|
|
qt_add_resources(undoframework "undoframework"
|
2020-02-04 08:15:50 +01:00
|
|
|
PREFIX
|
|
|
|
"/"
|
|
|
|
FILES
|
|
|
|
${undoframework_resource_files}
|
|
|
|
)
|
|
|
|
|
2019-06-04 17:08:47 +02:00
|
|
|
install(TARGETS undoframework
|
2024-03-18 13:21:08 +01:00
|
|
|
BUNDLE DESTINATION .
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_generate_deploy_app_script(
|
|
|
|
TARGET undoframework
|
|
|
|
OUTPUT_SCRIPT deploy_script
|
|
|
|
NO_UNSUPPORTED_PLATFORM_ERROR
|
2019-06-04 17:08:47 +02:00
|
|
|
)
|
2024-03-18 13:21:08 +01:00
|
|
|
install(SCRIPT ${deploy_script})
|