Commit 21866fd3 authored by Giorgio Azzinnaro's avatar Giorgio Azzinnaro

cmake install

parent 4da26e87
add_subdirectory(profanedb) add_subdirectory(profanedb)
# Only install headers and proto files
install(DIRECTORY profanedb DESTINATION include
FILES_MATCHING REGEX "^.*\.(hpp|h|proto)$")
...@@ -3,10 +3,11 @@ add_subdirectory(protobuf) # Generated Protobuf (& gRPC if neeeded) code ...@@ -3,10 +3,11 @@ add_subdirectory(protobuf) # Generated Protobuf (& gRPC if neeeded) code
add_subdirectory(format) add_subdirectory(format)
add_subdirectory(vault) add_subdirectory(vault)
# TODO Maybe we could build for google::protobuf::Message somewhere
add_library(profanedb) add_library(profanedb)
target_link_libraries(profanedb profanedb_format profanedb_vault profanedb_protobuf) target_link_libraries(profanedb profanedb_format profanedb_vault profanedb_protobuf)
install(TARGETS profanedb LIBRARY DESTINATION lib)
if(BUILD_PROFANEDB_SERVER) if(BUILD_PROFANEDB_SERVER)
add_subdirectory(server) add_subdirectory(server)
endif() endif()
...@@ -6,3 +6,5 @@ include_directories (${Boost_INCLUDE_DIRS}) ...@@ -6,3 +6,5 @@ include_directories (${Boost_INCLUDE_DIRS})
add_executable(profanedb_server main.cpp server.cpp config.cpp) add_executable(profanedb_server main.cpp server.cpp config.cpp)
target_link_libraries(profanedb_server ${Boost_LIBRARIES} profanedb_format profanedb_vault profanedb_grpc) target_link_libraries(profanedb_server ${Boost_LIBRARIES} profanedb_format profanedb_vault profanedb_grpc)
install(TARGETS profanedb_server RUNTIME DESTINATION bin)
find_package(RocksDB REQUIRED) # RocksDB is used as storage find_package(RocksDB REQUIRED) # RocksDB is used as storage
add_library(profanedb_vault STATIC rocksdb/storage.cpp) add_library(profanedb_vault STATIC rocksdb/storage.cpp sql/storage.cpp)
target_link_libraries(profanedb_vault profanedb_protobuf ${ROCKSDB_LIBRARIES}) target_link_libraries(profanedb_vault profanedb_protobuf ${ROCKSDB_LIBRARIES})
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
......
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