Debian Codegraph @

examples/widgets/painting/composition/CMakeLists.txt

raw
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(composition LANGUAGES CXX)
6
7 find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
8
9 qt_standard_project_setup()
10
11 qt_add_executable(composition
12 composition.cpp composition.h
13 main.cpp
14 )
15
16 set_target_properties(composition 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(composition 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(composition "shared"
72 PREFIX
73 "/res"
74 BASE
75 "../shared"
76 FILES
77 ${shared_resource_files}
78 )
79
80 set(composition_resource_files
81 "composition.cpp"
82 "composition.html"
83 "flower.jpg"
84 "flower_alpha.jpg"
85 )
86
87 qt_add_resources(composition "composition"
88 PREFIX
89 "/res/composition"
90 FILES
91 ${composition_resource_files}
92 )
93
94 install(TARGETS composition
95 BUNDLE DESTINATION .
96 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
97 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
98 )
99
100 qt_generate_deploy_app_script(
101 TARGET composition
102 OUTPUT_SCRIPT deploy_script
103 NO_UNSUPPORTED_PLATFORM_ERROR
104 )
105 install(SCRIPT ${deploy_script})