-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·66 lines (50 loc) · 1.58 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
64
65
66
cmake_minimum_required(VERSION 3.3)
project(brain_im
VERSION 0.1.0
)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# Add an option for building tests
option(ENABLE_TESTS "Enable compilation of automated tests" FALSE)
# Add an option for dev build
option(DEVELOPER_BUILD "Enable extra debug codepaths, like asserts and extra output" FALSE)
option(ENABLE_QML "Enable declarative plugin" TRUE)
option(ENABLE_QML_CLIENT "Enable QML Client build" FALSE)
option(USE_TELEPATHY "Build with Telepathy support" TRUE)
if (NOT INSTALL_QML_IMPORT_DIR)
set(INSTALL_QML_IMPORT_DIR ${CMAKE_INSTALL_LIBDIR}/qt5/qml)
endif()
find_package(Qt5 CONFIG REQUIRED COMPONENTS
Core
DBus
Gui
Network
Qml
Quick
Xml
Widgets
)
set(QT_VERSION_MAJOR "5")
if (USE_TELEPATHY)
find_package(TelepathyQt5 0.9.8 COMPONENTS Core Service REQUIRED)
endif()
include(GNUInstallDirs)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wextra -std=c++11 -Werror=return-type")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
add_subdirectory(src/brain-im)
if (ENABLE_QML)
add_subdirectory(src/imports)
endif()
if (ENABLE_QML_CLIENT)
add_subdirectory(examples/qmlclient)
endif()
message(STATUS "BrainIM configuration:")
message(STATUS " Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS " Qt: ${Qt5_VERSION} at ${_qt5Core_install_prefix}")
if (USE_TELEPATHY)
message(STATUS " TelepathyQt: ${TELEPATHY_QT5_VERSION}")
endif()