forked from wavii/darner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (33 loc) · 1.2 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
PROJECT(darner)
SET(DARNER_VERSION 0.2.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_POLICY(SET CMP0005 NEW) # don't complain about escaping the double-quotes below around DARNER_VERSION
ADD_DEFINITIONS(-Wall -Wno-return-type -O2 -g -DNDEBUG -DDARNER_VERSION="${DARNER_VERSION}")
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(darner
src/net/handler
src/net/request
src/util/log
src/queue/iqstream
src/queue/oqstream
src/queue/queue
src/main
)
ADD_EXECUTABLE(db
bench/db
)
ADD_EXECUTABLE(test
src/net/request
src/queue/iqstream
src/queue/oqstream
src/queue/queue
src/util/log
tests/queue
tests/request
tests/main
)
FIND_PACKAGE(Boost 1.40.0 COMPONENTS thread system program_options unit_test_framework filesystem)
TARGET_LINK_LIBRARIES(darner pthread ${Boost_LIBRARIES} leveldb snappy)
TARGET_LINK_LIBRARIES(db ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(test pthread ${Boost_LIBRARIES} leveldb snappy)
INSTALL(TARGETS darner DESTINATION bin)