summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideo/qmlvideo/CMakeLists.txt
blob: 84a65710e2a901aaac1c90ba2c521e008b0f6122 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
    message(FATAL_ERROR "This module is part of the 'qmlvideo' example, and should not be built independently.")
endif()

set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/qmlvideo/qmlvideo")

qt_add_qml_module(qmlvideo
    URI qmlvideo
    SOURCES
        videosingleton.cpp
        videosingleton.h
        qmlvideo_global.h
    QML_FILES
        "CameraBasic.qml"
        "CameraDrag.qml"
        "CameraDummy.qml"
        "CameraFullScreen.qml"
        "CameraFullScreenInverted.qml"
        "CameraItem.qml"
        "CameraMove.qml"
        "CameraOverlay.qml"
        "CameraResize.qml"
        "CameraRotate.qml"
        "CameraSpin.qml"
        "Content.qml"
        "ErrorDialog.qml"
        "Main.qml"
        "Scene.qml"
        "SceneBasic.qml"
        "SceneDrag.qml"
        "SceneFullScreen.qml"
        "SceneFullScreenInverted.qml"
        "SceneMove.qml"
        "SceneMulti.qml"
        "SceneOverlay.qml"
        "SceneResize.qml"
        "SceneRotate.qml"
        "SceneSelectionPanel.qml"
        "SceneSpin.qml"
        "SeekControl.qml"
        "VideoBasic.qml"
        "VideoDrag.qml"
        "VideoDummy.qml"
        "VideoFillMode.qml"
        "VideoFullScreen.qml"
        "VideoFullScreenInverted.qml"
        "VideoItem.qml"
        "VideoMetadata.qml"
        "VideoMove.qml"
        "VideoOverlay.qml"
        "VideoPlaybackRate.qml"
        "VideoResize.qml"
        "VideoRotate.qml"
        "VideoSeek.qml"
        "VideoSpin.qml"
    RESOURCES
        "images/folder.png"
        "images/leaves.jpg"
        "images/up.png"
)

target_compile_definitions(qmlvideo PRIVATE QMLVIDEO_LIB)

target_link_libraries(qmlvideo PRIVATE
    Qt6::Core
    Qt6::Gui
    Qt6::Quick
)

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

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