-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (39 loc) · 1.33 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
# SPDX-FileCopyrightText: 2022 Pier Luigi Fiorini <[email protected]>
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.19)
project("AuroraScanner"
VERSION "0.0.0"
DESCRIPTION "Converts Wayland protocol definition to C++ code"
LANGUAGES CXX C
)
## Only build on the appropriate platforms.
if(NOT (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Darwin" OR CMAKE_SYSTEM_NAME MATCHES "QNX"))
message(NOTICE "Skipping the build as the condition \"Linux OR Darwin OR QNX\" is not met.")
return()
endif()
## Enable feature summary at the end of the configure run:
include(FeatureSummary)
## Find Qt:
find_package(Qt6 6.6.0
REQUIRED
COMPONENTS
Core
Xml
)
## 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)
## Disable use of C++ API deprecated in Qt 5.15
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)
## Add subdirectories:
add_subdirectory(src/waylandscanner)