Commit 4b505d69 authored by Giorgio Azzinnaro's avatar Giorgio Azzinnaro

cmake build

parent 8915a0f2
......@@ -9,6 +9,7 @@ set(PROTOBUF_IMPORT_DIRS "${CMAKE_SOURCE_DIR}/src")
option(BUILD_SHARED_LIBS "Build libprofanedb.so, to embed ProfaneDB" ON)
option(BUILD_PROFANEDB_SERVER "Build ProfaneDB gRPC server" OFF)
# TODO Making stuff modular, each module will get its dir and dependencies
find_package(Threads REQUIRED)
find_package(Protobuf REQUIRED) # Protobuf does the serialisation for the DB
find_package(RocksDB REQUIRED) # RocksDB is used as storage
......
......@@ -4,7 +4,7 @@ add_subdirectory(format)
add_subdirectory(vault)
add_library(profanedb db.cpp)
target_link_libraries(profanedb profanedb_protobuf)
target_link_libraries(profanedb profanedb_format profanedb_vault profanedb_protobuf)
# Nothing should depend on code in here, so it can be skipped entirely
if(BUILD_PROFANEDB_SERVER)
......
add_library(profanedb_format protobuf/marshaller.cpp)
target_link_libraries(profanedb_format profanedb_protobuf)
add_library(profanedb_format protobuf/marshaller.cpp protobuf/loader.cpp)
target_link_libraries(profanedb_format profanedb_protobuf ${Boost_LIBRARIES})
add_executable(profanedb_server main.cpp server.cpp)
target_link_libraries(profanedb_server profanedb_grpc profanedb_storage)
target_link_libraries(profanedb_server profanedb profanedb_grpc)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment