-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
59 lines (48 loc) · 1.57 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
cmake_minimum_required (VERSION 2.6)
project (SSEHub)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_C_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS "-Wall -std=c++11")
add_executable( ssehub
lib/picohttpparser/picohttpparser.c
src/SSEInputSource.cpp
src/InputSources/amqp/AmqpInputSource.cpp
src/CacheAdapters/LevelDB.cpp
src/CacheAdapters/Redis.cpp
src/CacheAdapters/Memory.cpp
src/SSEClient.cpp src/SSEClientHandler.cpp
src/SSEChannel.cpp
src/HTTPRequest.cpp
src/HTTPResponse.cpp
src/SSEServer.cpp
src/SSEConfig.cpp
src/SSEEvent.cpp
src/SSEStatsHandler.cpp
src/main.cpp
)
# glog
find_package( Glog REQUIRED )
include_directories( ${Glog_INCLUDE_PATH} )
# snappy
find_package( Snappy REQUIRED )
include_directories( ${Snappy_INCLUDE_DIR} )
# leveldb
find_package( LevelDB REQUIRED )
include_directories( ${LevelDB_INCLUDE_PATH} )
# rabbitmq
find_package( RabbitMQ REQUIRED )
include_directories( ${RabbitMQ_INCLUDE_DIR} )
# Threads
find_package( Threads REQUIRED )
include_directories( ${Threads_INCLUDE_DIR} )
# Boost
find_package( Boost COMPONENTS system program_options thread REQUIRED )
include_directories( ${Boost_INCLUDE_DIR} )
# Include local header files
include_directories ("${PROJECT_SOURCE_DIR}/includes" "${PROJECT_SOURCE_DIR}/lib")
target_link_libraries( ssehub ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries( ssehub ${Glog_LIBRARIES} )
target_link_libraries( ssehub ${Snappy_LIBRARIES} )
target_link_libraries( ssehub ${LevelDB_LIBRARIES} )
target_link_libraries( ssehub ${RabbitMQ_LIBRARIES} )
target_link_libraries( ssehub ${Boost_LIBRARIES} )