-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
63 lines (51 loc) · 1.85 KB
/
CMakeLists.txt
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
# https://doc.qt.io/qt-6/cmake-manual.html
cmake_minimum_required(VERSION 3.19)
project(Qti VERSION "0.0.1")
set(QT_MIN_VERSION "6.6.0")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(WAYLAND "Enable Wayland support" ON)
option(PLUGINS "Set the default value for whether plugins should be built" ON)
option(PLUGIN_STDLIB "Include Stdlib plugin" ${PLUGINS})
option(PLUGIN_CORE "Include Core plugin" ${PLUGINS})
option(PLUGIN_FILESYSTEM "Include Filesystem plugin" ${PLUGINS})
option(PLUGIN_PROCESS "Include Process plugin" ${PLUGINS})
option(PLUGIN_SCREENSHOT "Include Screenshot plugin" ${PLUGINS})
option(PLUGIN_CLIPBOARD "Include Clipboard plugin" ${PLUGINS})
option(PLUGIN_APPLICATION_DATABASE "Include Application Database plugin" ${PLUGINS})
option(PLUGIN_SQL "Include SQL plugin" ${PLUGINS})
# nix workaround
if (CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()
add_compile_options(-Wall -Wextra)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2 Svg WaylandClient)
qt_standard_project_setup()
qt_add_executable(qti src/main.cpp)
install(TARGETS qti)
target_link_libraries(qti PRIVATE Qt6::Core Qt6::Gui Qt6::Qml Qt6::Quick Qt6::WaylandClient Qt6::WaylandClientPrivate)
if (PLUGIN_STDLIB)
add_subdirectory(plugin/stdlib)
endif()
if (PLUGIN_CORE)
add_subdirectory(plugin/core)
endif()
if (PLUGIN_FILESYSTEM)
add_subdirectory(plugin/filesystem)
endif()
if (PLUGIN_PROCESS)
add_subdirectory(plugin/process)
endif()
if (PLUGIN_SCREENSHOT)
add_subdirectory(plugin/screenshot)
endif()
if (PLUGIN_CLIPBOARD)
add_subdirectory(plugin/clipboard)
endif()
if (PLUGIN_APPLICATION_DATABASE)
add_subdirectory(plugin/application-database)
endif()
if (PLUGIN_SQL)
add_subdirectory(plugin/sql)
endif()