aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml/chapter6-plugins/CMakeLists.txt
blob: f8b1a2de4c07e1134fe514403a5dee9c74f63b63 (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
35
36
37
38
39
40
41
42
43
44
# Generated from chapter6-plugins.pro.

cmake_minimum_required(VERSION 3.14)
project(chapter6-plugins LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter6-plugins")

find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)

add_qt_gui_executable(chapter6-plugins
    main.cpp
)
target_link_libraries(chapter6-plugins PUBLIC
    Qt::Qml
    Qt::Quick
)


# Resources:
set(app_resource_files
    "app.qml"
)

qt6_add_resources(chapter6-plugins "app"
    PREFIX
        "/"
    FILES
        ${app_resource_files}
)

install(TARGETS chapter6-plugins
    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
    BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
    LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

add_subdirectory(import)