| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 |
|
| 4 |
cmake_minimum_required(VERSION 3.16) |
| 5 |
project(pathstroke LANGUAGES CXX) |
| 6 |
|
| 7 |
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) |
| 8 |
|
| 9 |
qt_standard_project_setup() |
| 10 |
|
| 11 |
qt_add_executable(pathstroke |
| 12 |
main.cpp |
| 13 |
pathstroke.cpp pathstroke.h |
| 14 |
) |
| 15 |
|
| 16 |
set_target_properties(pathstroke PROPERTIES |
| 17 |
WIN32_EXECUTABLE TRUE |
| 18 |
MACOSX_BUNDLE TRUE |
| 19 |
) |
| 20 |
|
| 21 |
if(NOT TARGET painting_shared::painting_shared) |
| 22 |
include(../shared/use_lib.cmake) |
| 23 |
endif() |
| 24 |
|
| 25 |
target_link_libraries(pathstroke PRIVATE |
| 26 |
Qt6::Core |
| 27 |
Qt6::Gui |
| 28 |
Qt6::Widgets |
| 29 |
painting_shared::painting_shared |
| 30 |
) |
| 31 |
|
| 32 |
# Resources: |
| 33 |
set(shared_resource_files |
| 34 |
"../shared/images/button_normal_cap_left.png" |
| 35 |
"../shared/images/button_normal_cap_right.png" |
| 36 |
"../shared/images/button_normal_stretch.png" |
| 37 |
"../shared/images/button_pressed_cap_left.png" |
| 38 |
"../shared/images/button_pressed_cap_right.png" |
| 39 |
"../shared/images/button_pressed_stretch.png" |
| 40 |
"../shared/images/frame_bottom.png" |
| 41 |
"../shared/images/frame_bottomleft.png" |
| 42 |
"../shared/images/frame_bottomright.png" |
| 43 |
"../shared/images/frame_left.png" |
| 44 |
"../shared/images/frame_right.png" |
| 45 |
"../shared/images/frame_top.png" |
| 46 |
"../shared/images/frame_topleft.png" |
| 47 |
"../shared/images/frame_topright.png" |
| 48 |
"../shared/images/groupframe_bottom_left.png" |
| 49 |
"../shared/images/groupframe_bottom_right.png" |
| 50 |
"../shared/images/groupframe_bottom_stretch.png" |
| 51 |
"../shared/images/groupframe_left_stretch.png" |
| 52 |
"../shared/images/groupframe_right_stretch.png" |
| 53 |
"../shared/images/groupframe_top_stretch.png" |
| 54 |
"../shared/images/groupframe_topleft.png" |
| 55 |
"../shared/images/groupframe_topright.png" |
| 56 |
"../shared/images/line_dash_dot.png" |
| 57 |
"../shared/images/line_dash_dot_dot.png" |
| 58 |
"../shared/images/line_dashed.png" |
| 59 |
"../shared/images/line_dotted.png" |
| 60 |
"../shared/images/line_solid.png" |
| 61 |
"../shared/images/radiobutton-on.png" |
| 62 |
"../shared/images/radiobutton_off.png" |
| 63 |
"../shared/images/radiobutton_on.png" |
| 64 |
"../shared/images/slider_bar.png" |
| 65 |
"../shared/images/slider_thumb_on.png" |
| 66 |
"../shared/images/title_cap_left.png" |
| 67 |
"../shared/images/title_cap_right.png" |
| 68 |
"../shared/images/title_stretch.png" |
| 69 |
) |
| 70 |
|
| 71 |
qt_add_resources(pathstroke "shared" |
| 72 |
PREFIX |
| 73 |
"/res" |
| 74 |
BASE |
| 75 |
"../shared" |
| 76 |
FILES |
| 77 |
${shared_resource_files} |
| 78 |
) |
| 79 |
|
| 80 |
set(pathstroke_resource_files |
| 81 |
"pathstroke.cpp" |
| 82 |
"pathstroke.html" |
| 83 |
) |
| 84 |
|
| 85 |
qt_add_resources(pathstroke "pathstroke" |
| 86 |
PREFIX |
| 87 |
"/res/pathstroke" |
| 88 |
FILES |
| 89 |
${pathstroke_resource_files} |
| 90 |
) |
| 91 |
|
| 92 |
install(TARGETS pathstroke |
| 93 |
BUNDLE DESTINATION . |
| 94 |
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 95 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 96 |
) |
| 97 |
|
| 98 |
qt_generate_deploy_app_script( |
| 99 |
TARGET pathstroke |
| 100 |
OUTPUT_SCRIPT deploy_script |
| 101 |
NO_UNSUPPORTED_PLATFORM_ERROR |
| 102 |
) |
| 103 |
install(SCRIPT ${deploy_script}) |