forked from BlueBrain/Rockets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (53 loc) · 2.34 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
# Copyright (c) 2017-2018, EPFL/Blue Brain Project
#
# This file is part of Rockets <https://github.com/BlueBrain/Rockets>
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 3.0 as published
# by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(Rockets VERSION 0.1.0)
set(Rockets_VERSION_ABI 1)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/common)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/CMake/common/Common.cmake)
message(FATAL_ERROR "CMake/common missing, run: git submodule update --init")
endif()
set(ROCKETS_DEB_DEPENDS libboost-test-dev libwebsockets-dev libuv1-dev)
set(ROCKETS_PORT_DEPENDS libwebsockets)
include(Common)
set(ROCKETS_DESCRIPTION "Rockets - REST and websockets C++ library")
set(ROCKETS_MAINTAINER "Blue Brain Project <[email protected]>")
set(ROCKETS_LICENSE LGPL)
common_find_package(Boost SYSTEM COMPONENTS unit_test_framework)
common_find_package(Libwebsockets SYSTEM)
if(NOT Libwebsockets_FOUND) # Ubuntu package only has libwebsockets.pc
common_find_package_disable(Libwebsockets)
common_find_package(libwebsockets SYSTEM REQUIRED)
set(Libwebsockets_VERSION ${libwebsockets_VERSION})
endif()
common_find_package(Threads REQUIRED)
common_find_package_post()
set(ROCKETS_DEPENDENT_LIBRARIES Threads)
option(ROCKETS_BUILD_APPLICATIONS "Build example applications" ON)
if(ROCKETS_BUILD_APPLICATIONS)
add_subdirectory(apps)
endif()
add_subdirectory(rockets)
add_subdirectory(tests)
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
set(ROCKETS_PACKAGE_DEB_DEPENDS libwebsockets-dev)
include(CommonCPack)
set(COMMON_PROJECT_DOMAIN ch.epfl.bluebrain)
set(DOXYGEN_MAINPAGE_MD README.md)
set(DOXYGEN_EXTRA_INPUT ${PROJECT_SOURCE_DIR}/README.md)
include(DoxygenRule)