-
-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathfeatures.cmake
More file actions
75 lines (62 loc) · 2.23 KB
/
Copy pathfeatures.cmake
File metadata and controls
75 lines (62 loc) · 2.23 KB
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
# SPDX-FileCopyrightText: 2023 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
# SPDX-License-Identifier: BSD-3-Clause
#### Features
## Enable feature summary at the end of the configure run:
include(FeatureSummary)
# Documentation
option(FLUID_WITH_DOCUMENTATION "Build documentation" OFF)
if(FLUID_WITH_DOCUMENTATION)
find_package(Doxygen QUIET)
find_program(DOXYQML_EXECUTABLE NAMES doxyqml)
if(NOT Doxygen_FOUND)
message(WARNING "Doxygen not found, documentation will not be built")
set(FLUID_WITH_DOCUMENTATION OFF)
elseif(NOT DOXYQML_EXECUTABLE)
message(WARNING "doxyqml not found, documentation will not be built")
set(FLUID_WITH_DOCUMENTATION OFF)
endif()
endif()
add_feature_info("Fluid::Documentation" FLUID_WITH_DOCUMENTATION "Build Fluid documentation")
# Gallery
option(FLUID_WITH_GALLERY "Build demo application" ON)
add_feature_info("Fluid::Gallery" FLUID_WITH_GALLERY "Build Fluid demo application")
# QML modules
option(FLUID_WITH_QML_MODULES "Build QML modules" ON)
add_feature_info("Fluid::QMLModules" FLUID_WITH_QML_MODULES "Build Fluid QML modules")
## Summary:
if(NOT LIRI_SUPERBUILD)
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)
endif()
#### Dependencies
if(FLUID_WITH_QML_MODULES)
# Fluid deliberately uses Qt's private GUI APIs for platform theme and
# window-decoration integration. This is an acknowledged Qt-version tie.
set(QT_NO_PRIVATE_MODULE_WARNING ON)
## Find Qt:
find_package(Qt6 6.9
REQUIRED
COMPONENTS
Core
Gui
Svg
Qml
Quick
QuickControls2
ShaderTools
)
if(NOT TARGET Qt6::GuiPrivate)
# GuiPrivate is supposed to be automatically found when finding Gui per
# https://doc.qt.io/qt-6/qtguiprivate-module.html#details, but on Arch
# Linux it is packaged differently.
find_package(Qt6 6.9 REQUIRED COMPONENTS GuiPrivate)
endif()
if(BUILD_TESTING)
find_package(Qt6 6.9 OPTIONAL_COMPONENTS QuickTest)
endif()
## Standard project setup:
qt_standard_project_setup(REQUIRES 6.9)
## Qt policies:
if(QT_KNOWN_POLICY_QTP0004)
qt_policy(SET QTP0004 NEW)
endif()
endif()