-
-
Notifications
You must be signed in to change notification settings - Fork 112
/
CMakeLists.txt
62 lines (49 loc) · 1.43 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
cmake_minimum_required(VERSION 3.19)
project("Fluid"
VERSION "1.3.0"
DESCRIPTION "Material Design implementation with QtQuick Controls 2"
LANGUAGES CXX C
)
## ECM:
find_package(ECM 5.245.0 REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
## Installation directories:
include(KDEInstallDirs)
## Compiler settings:
set(KDE_SKIP_NULLPTR_WARNINGS_SETTINGS TRUE)
include(KDECompilerSettings NO_POLICY_SCOPE)
## Enable keywords such as emit:
# TODO: Replace keywords such as emit with Q_EMIT
remove_definitions(-DQT_NO_KEYWORDS)
## CMake settings:
include(KDECMakeSettings)
## QML module:
include(ECMQmlModule)
## Features:
include(features.cmake)
## Disable use of C++ API deprecated in Qt 5.15
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)
## Enable C++17:
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
## Treat warnings as errors:
add_compile_options(-Wall -Wextra -Werror)
## QML import path:
if(NOT QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/bin CACHE STRING "" FORCE)
endif()
## Add subdirectories:
if(FLUID_WITH_DOCUMENTATION)
add_subdirectory(doc)
endif()
if(FLUID_WITH_QML_MODULES)
add_subdirectory(src/imports/controls)
add_subdirectory(src/imports/private)
add_subdirectory(src/imports/templates)
if(FLUID_WITH_DEMO)
add_subdirectory(src/demo)
endif()
if(BUILD_TESTING)
add_subdirectory(tests/auto)
endif()
endif()