-
Notifications
You must be signed in to change notification settings - Fork 34
/
CMakeLists.txt
47 lines (34 loc) · 1.61 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
cmake_minimum_required(VERSION 2.8)
project(vertexdb)
add_subdirectory(source/basekit)
add_definitions(-O0 -g)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/")
file(GLOB MAIN_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/source/*.c")
file(GLOB PDB_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/source/pdb/*.c")
file(GLOB BASEKIT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/source/basekit/source/*.c")
file(GLOB STORE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/source/store/*.c")
file(GLOB HTTPSERVER_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/source/httpserver/*.c")
file(GLOB BASEKIT_SIMD_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/source/basekit/source/simd_cph/include")
set(SRCS ${MAIN_SRCS} ${PDB_SRCS} ${BASEKIT_SRCS} ${STORE_SRCS} ${HTTPSERVER_SRCS} ${BASEKIT_SIMD_SRCS})
add_executable(vertexdb ${SRCS})
# Initializing libEvent
find_package(Event)
target_link_libraries(vertexdb ${EVENT_LIBRARY})
include_directories(${EVENT_INCLUDE_DIR})
# Initializing TokyoCabinet
find_package(TokyoCabinet)
target_link_libraries(vertexdb ${TOKYOCABINET_LIBRARY})
include_directories(${TOKYOCABINET_INCLUDE_DIR})
# Initializing YAJL
find_package(Yajl)
target_link_libraries(vertexdb ${YAJL_LIBRARY})
include_directories(${YAJL_INCLUDE_DIR})
# Add libdl
find_library( DL_LIB NAMES ${CMAKE_DL_LIBS} )
target_link_libraries(vertexdb ${CMAKE_DL_LIBS})
MESSAGE( STATUS "using dl library: ${DL_LIB}" )
target_link_libraries(vertexdb m)
MESSAGE( STATUS "using m library from the standard glibc")
include_directories(source source/pdb source/httpserver source/basekit/source source/store source/basekit/source/simd_cph/include)
# installing vertextdb binary
install(TARGETS vertexdb DESTINATION bin)