summaryrefslogtreecommitdiffstats
path: root/QtLauncher/CMakeLists.txt
blob: b0a40a2330b9c476eebe5a98ef18cb0506ba7a95 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
cmake_minimum_required(VERSION 3.16)

project(QtLauncher VERSION 1.0 LANGUAGES CXX)

find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2 WaylandCompositor)
qt_standard_project_setup(REQUIRES 6.5)

set_source_files_properties("ViewSettings.qml" PROPERTIES
    QT_QML_SINGLETON_TYPE TRUE
)

set(qml_files
    "Main.qml"
    "BootScreen.qml"
    "BusyIndicator.qml"
    "Keyboard.qml"
    "MainWindow.qml"
    "DemoHeader.qml"
    "DetailView.qml"
    "Header.qml"
    "LaunchScreen.qml"
    "LauncherCompositor.qml"
    "Background.qml"
    "DemoInfoPopup.qml"
    "DemoSurface.qml"
    "GridViewIcon.qml"
    "FlickSlider.qml"
    "ApplicationIcon.qml"
    "DetailViewIcon.qml"
    "SettingsButton.qml"
    "ViewSettings.qml"
    "CornerFrameImage.qml"
)

set(images
    "images/backImg.jpg"
    "images/QtCorner.png"
    "images/glow.png"
)

set(icons
    "icons/close_icon.svg"
    "icons/Built_with_Qt_RGB_logo_white.svg"
    "icons/header_toggle_icon.svg"
    "icons/info_icon.svg"
    "icons/qt_logo_green_rgb.svg"
    "icons/mouse_icon.svg"
    "icons/detail_icon.svg"
    "icons/settings_icon.svg"
    "icons/grid_icon.svg"
    "icons/touch_icon.svg"
)

add_subdirectory(QtImageProviders)

qt_add_qml_module(${PROJECT_NAME}
    URI QtLauncher
    VERSION 1.0
    ${BUILD_TYPE_FLAG}
    DEPENDENCIES
        QtQml
        QtQuick
    QML_FILES
        ${qml_files}
    RESOURCES
        ${images}
        ${icons}
    SOURCES
        engine.cpp engine.h
        applicationsmodel.cpp applicationsmodel.h
        settingsmanager.cpp settingsmanager.h
        circularindicator.cpp circularindicator.h
)

target_link_libraries(${PROJECT_NAME} PRIVATE
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::Gui
    Qt${QT_VERSION_MAJOR}::Quick
)

if(NOT ${USE_STATIC_BUILD_FLAG})
    install(TARGETS ${PROJECT_NAME}
        BUNDLE DESTINATION .
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    )

    install(TARGETS ${PROJECT_NAME}plugin
        LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/qml/${PROJECT_NAME}"
    )

    install(FILES $<TARGET_FILE_DIR:${PROJECT_NAME}plugin>/qmldir
        DESTINATION "${CMAKE_INSTALL_LIBDIR}/qml/${PROJECT_NAME}"
    )
endif()