-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
64 lines (47 loc) · 1.08 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
project(rollingdb)
set(CMAKE_BUILD_TYPE RelWithDebugInfo)
cmake_minimum_required (VERSION 2.6)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
option(BUILD_TESTS "Use CUDA support" OFF)
FIND_PACKAGE( log4cplus REQUIRED )
ADD_DEFINITIONS(
-std=c++11
)
include_directories(
${CMAKE_SOURCE_DIR}/src
)
add_library(rollingdb SHARED
src/rollingdb.cpp
src/rollingdb_impl.cpp
src/chunkcollection.cpp
src/lmdbchunk.cpp
src/system_utils.cpp
)
TARGET_LINK_LIBRARIES(rollingdb
lmdb
re2
pthread
${log4cplus_LIBRARIES}
)
# Tests
ADD_EXECUTABLE( rdb_write
rdb_write.cpp
)
TARGET_LINK_LIBRARIES(rdb_write
rollingdb
)
ADD_EXECUTABLE( rdb_read
rdb_read.cpp
)
TARGET_LINK_LIBRARIES(rdb_read
rollingdb
)
set_target_properties(rollingdb PROPERTIES SOVERSION 2)
install (FILES src/rollingdb.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install (TARGETS rollingdb DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
IF (WIN32)
SET(WINDOWS_LIBS ws2_32)
ENDIF()
IF (BUILD_TESTS)
add_subdirectory(tests)
ENDIF()