-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (30 loc) · 1.22 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
project(rift)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall -Wextra -fstack-protector-all")
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/debian/changelog" DEBCHANGELOG)
string(REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)" DEBFULLVERSION "${DEBCHANGELOG}")
string(REGEX MATCH "([0-9]+\\.[0-9]+)" RIFT_VERSION_ABI "${DEBFULLVERSION}")
string(REGEX MATCH "([0-9]+$)" RIFT_VERSION_MINOR "${DEBFULLVERSION}")
include(cmake/locate_library.cmake)
LOCATE_LIBRARY(THEVOID "thevoid/server.hpp" "thevoid")
LOCATE_LIBRARY(SWARM "swarm/http_response.hpp" "swarm")
LOCATE_LIBRARY(SWARM_URLFETCHER "swarm/http_response.hpp" "swarm_urlfetcher")
LOCATE_LIBRARY(MSGPACK "msgpack.hpp" "msgpack")
find_package(Boost COMPONENTS system thread program_options REQUIRED)
find_package(Elliptics 2.24 REQUIRED)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/include"
${Boost_INCLUDE_DIRS}
${MSGPACK_INCLUDE_DIRS}
${THEVOID_INCLUDE_DIRS}
${SWARM_INCLUDE_DIRS}
${ELLIPTICS_INCLUDE_DIRS}
)
link_directories(
${Boost_LIBRARY_DIRS}
${MSGPACK_LIBRARY_DIRS}
${THEVOID_LIBRARY_DIRS}
)
add_subdirectory(src)
file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/include/rift/*.hpp")
install(FILES ${headers} DESTINATION include/rift)