-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (32 loc) · 945 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
## Add paths to check for cmake modules:
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(FeatureSummary)
include(QbsBuildConfig)
file(STRINGS VERSION QBS_VERSION)
project(Qbs VERSION ${QBS_VERSION})
# Force C++ standard, do not fall back, do not use compiler extensions
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Set up Qt stuff:
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(WITH_TESTS)
enable_testing()
set(QT_TEST_COMPONENT Test)
set(IMPLICIT_DEPENDS Qt5::Test)
endif()
find_package(Qt5
COMPONENTS Concurrent Core Gui Network Script Widgets Xml ${QT_TEST_COMPONENT}
REQUIRED
)
add_subdirectory(src)
add_subdirectory(doc)
add_subdirectory(share)
if(WITH_TESTS)
add_subdirectory(tests)
endif()