| 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(imagecomposition LANGUAGES CXX) |
| 6 |
|
| 7 |
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) |
| 8 |
|
| 9 |
qt_standard_project_setup() |
| 10 |
|
| 11 |
qt_add_executable(imagecomposition |
| 12 |
imagecomposer.cpp imagecomposer.h |
| 13 |
main.cpp |
| 14 |
) |
| 15 |
|
| 16 |
set_target_properties(imagecomposition PROPERTIES |
| 17 |
WIN32_EXECUTABLE TRUE |
| 18 |
MACOSX_BUNDLE TRUE |
| 19 |
) |
| 20 |
|
| 21 |
target_link_libraries(imagecomposition PRIVATE |
| 22 |
Qt6::Core |
| 23 |
Qt6::Gui |
| 24 |
Qt6::Widgets |
| 25 |
) |
| 26 |
|
| 27 |
# Resources: |
| 28 |
set(imagecomposition_resource_files |
| 29 |
"images/butterfly.png" |
| 30 |
"images/checker.png" |
| 31 |
) |
| 32 |
|
| 33 |
qt_add_resources(imagecomposition "imagecomposition" |
| 34 |
PREFIX |
| 35 |
"/" |
| 36 |
FILES |
| 37 |
${imagecomposition_resource_files} |
| 38 |
) |
| 39 |
|
| 40 |
install(TARGETS imagecomposition |
| 41 |
BUNDLE DESTINATION . |
| 42 |
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 43 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 44 |
) |
| 45 |
|
| 46 |
qt_generate_deploy_app_script( |
| 47 |
TARGET imagecomposition |
| 48 |
OUTPUT_SCRIPT deploy_script |
| 49 |
NO_UNSUPPORTED_PLATFORM_ERROR |
| 50 |
) |
| 51 |
install(SCRIPT ${deploy_script}) |