aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt
blob: 7be201de6548ea9c9b2220b49ec753aa38874022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
    message(FATAL_ERROR "TextBalloon should be built as part of the 'painteditem' project, and not in isolation.")
endif()

set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/painteditem/TextBalloon")

qt_add_qml_module(qmltextballoon
    VERSION 1.0
    URI "TextBalloon"
    PLUGIN_TARGET qmltextballoon
    AUTO_RESOURCE_PREFIX
    SOURCES
        textballoon.cpp textballoon.h
)

target_link_libraries(qmltextballoon PUBLIC
    Qt::Core
    Qt::Gui
    Qt::Qml
    Qt::Quick
)

install(TARGETS qmltextballoon
    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
    BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
    LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
    DESTINATION "${INSTALL_EXAMPLEDIR}"
)