Newer
Older

Claudio Bisegni
committed
#add module path for permi to find lirary
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_MACOSX_RPATH ON)
MESG("Configure Metadata Service")
option(COMPILE_HAZELCAST_LIVE_DRIVER "Compile hazelcast live data driver" OFF)

Claudio Bisegni
committed
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
#
# ExternalProject_Add(
# cpprestsdk
# GIT_REPOSITORY https://github.com/microsoft/cpprestsdk.git
# PREFIX "${CMAKE_BINARY_DIR}/ext_dep/cpprest-prefix"
# SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/cpprest-src"
# BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/cpprest-build"
# # BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS}
# CMAKE_ARGS
# -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Release
# -DBUILD_STATIC_LIBS=ON
# -DBUILD_SHARED_LIBS=OFF
# LOG_DOWNLOAD ON
# LOG_CONFIGURE ON
# LOG_BUILD ON)
# ExternalProject_Add(
# fmtlib
# GIT_REPOSITORY https://github.com/fmtlib/fmt.git
# GIT_TAG 6.1.2
# PREFIX "${CMAKE_BINARY_DIR}/ext_dep/fmtlib-prefix"
# SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/fmtlib-src"
# BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/fmtlib-build"
# # BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS}
# CMAKE_ARGS
# -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Release
# -DBUILD_STATIC_LIBS=ON
# -DBUILD_SHARED_LIBS=OFF
# LOG_DOWNLOAD ON
# LOG_CONFIGURE ON
# LOG_BUILD ON)
# ExternalProject_Add(
# rxcpp
# GIT_REPOSITORY https://github.com/ReactiveX/RxCpp.git
# PREFIX "${CMAKE_BINARY_DIR}/ext_dep/rxcpp-prefix"
# SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/rxcpp-src"
# BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/rxcpp-build"
# # BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS}
# CMAKE_ARGS
# -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Release
# -DBUILD_STATIC_LIBS=ON
# -DBUILD_SHARED_LIBS=OFF
# LOG_DOWNLOAD ON
# LOG_CONFIGURE ON
# LOG_BUILD ON)
IF (DEFINED ENV{CHAOS_BUNDLE} )
include($ENV{CHAOS_BUNDLE}/tools/project_template/CMakeChaos.txt)
ENDIF()
# MESG("Influxdb client")
# ExternalProject_Add(
# influxdb-cpp
# GIT_REPOSITORY https://github.com/orca-zhang/influxdb-cpp.git
# PREFIX "${CMAKE_BINARY_DIR}/ext_dep/influxdb-cpp-prefix"
# SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/influxdb-cpp-src"
# BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/influxdb-cpp-build"
# CMAKE_ARGS
# -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
# -DCMAKE_BUILD_TYPE=Release
# -DBUILD_STATIC_LIBS=ON
# -DBUILD_SHARED_LIBS=OFF
# LOG_DOWNLOAD ON
# LOG_CONFIGURE ON
# LOG_BUILD ON)
#
IF(KAFKA_RDK_ENABLE)
# message(STATUS "ENABLING KAFKA ASIO on ${PROJECT_NAME}")
ADD_DEFINITIONS(-DKAFKA_RDK_ENABLE)
ENDIF(KAFKA_RDK_ENABLE)
IF (COMPILE_HAZELCAST_LIVE_DRIVER)

Claudio Bisegni
committed
MESG("Install hazelcast c++ client")
ExternalProject_Add(
hazelcast
GIT_REPOSITORY https://github.com/hazelcast/hazelcast-cpp-client.git
GIT_TAG v3.9.1
PREFIX "${CMAKE_BINARY_DIR}/ext_dep/hazelcast-prefix"
SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/hazelcast-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/hazelcast-build"
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}

Claudio Bisegni
committed
-DHZ_LIB_TYPE=STATIC
-DHZ_BIT=64
-DCMAKE_BUILD_TYPE=Release
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
# Specify include dir
ExternalProject_Get_Property(hazelcast source_dir)
set(HAZELCAST_INCLUDE_DIR ${source_dir}/include)
# Library
ExternalProject_Get_Property(hazelcast binary_dir)
set(HAZELCAST_LIBRARY_DIR ${binary_dir})
MESG("${HAZELCAST_INCLUDE_DIR}")
MESG("${HAZELCAST_LIBRARY_DIR}")
MESG("${HAZELCAST_LIBRARY}")
ENDIF()

Claudio Bisegni
committed
MESG("Install c mongodb driver")
ExternalProject_Add(
mongo-c-driver
GIT_REPOSITORY https://github.com/mongodb/mongo-c-driver.git
PREFIX "${CMAKE_BINARY_DIR}/ext_dep/mongo-c-driver-prefix"
SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/mongo-c-driver-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/mongo-c-driver-build"
# BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Release -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_BSON=ONLY
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
MESG("Install c couchbase driver")
ExternalProject_Add(
couchbase-c-driver
GIT_REPOSITORY https://github.com/couchbase/libcouchbase.git
GIT_TAG release-2.10
PREFIX "${CMAKE_BINARY_DIR}/ext_dep/couchbase-c-driver-prefix"
SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/couchbase-c-driver-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/couchbase-c-driver-build"
INSTALL_COMMAND cp ${CMAKE_BINARY_DIR}/ext_dep/couchbase-c-driver-build/lib/libcouchbase.so ${CMAKE_INSTALL_PREFIX}/lib
BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS} install
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DLCB_INSTALL_HEADERS=ON -DLCB_NO_PLUGINS=ON -DCMAKE_BUILD_TYPE=Release -DLCB_NO_TESTS=ON -DLCB_NO_MOCK=ON -DLCB_NO_SSL=ON
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
MESG("Install cxx mongodb driver")
ExternalProject_Add(
mongo-cxx-driver
DEPENDS mongo-c-driver
# GIT_REPOSITORY https://github.com/mongodb/mongo-cxx-driver
GIT_REPOSITORY https://github.com/amichelotti/mongo-cxx-driver
#GIT_TAG r3.3.1
GIT_TAG mongocxx-chaos
PREFIX "${CMAKE_BINARY_DIR}/ext_dep/mongo-cxx-driver-prefix"
SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/mongo-cxx-driver-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/mongo-cxx-driver-build"
# BUILD_COMMAND make CFLAGS=${CMAKE_C_FLAGS} CXXFLAGS=${CMAKE_CXX_FLAGS}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Release
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
include_directories(${LIBMONGOCXX_INCLUDE_DIR})
include_directories(${LIBBSONCXX_INCLUDE_DIR})
include_directories("${CMAKE_INSTALL_PREFIX}/include/mongocxx/v_noabi")
include_directories("${CMAKE_INSTALL_PREFIX}/include/bsoncxx/v_noabi")
include_directories("${CMAKE_INSTALL_PREFIX}/include/libmongoc-1.0")
include_directories("${CMAKE_INSTALL_PREFIX}/include/libbson-1.0")
include_directories("${CMAKE_INSTALL_PREFIX}/lib")
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# MESG("Install libuv driver for cassandra dependecy")
# ExternalProject_Add(
# libuv-driver
# GIT_REPOSITORY https://github.com/libuv/libuv.git
# GIT_TAG v1.24.0
# PREFIX "${CMAKE_BINARY_DIR}/ext_dep/libuv-driver-prefix"
# SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/libuv-driver-src"
# BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/libuv-driver-build"
# CMAKE_ARGS
# -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
# LOG_DOWNLOAD ON
# LOG_CONFIGURE ON
# LOG_BUILD ON)
# MESG("Install Cassandra driver")
# ExternalProject_Add(
# cassandra-driver
# DEPENDS libuv-driver
# GIT_REPOSITORY https://github.com/datastax/cpp-driver.git
# GIT_TAG 2.10.0
# PREFIX "${CMAKE_BINARY_DIR}/ext_dep/cassandra-driver-prefix"
# SOURCE_DIR "${CMAKE_BINARY_DIR}/ext_dep/cassandra-driver-src"
# BINARY_DIR "${CMAKE_BINARY_DIR}/ext_dep/cassandra-driver-build"
# CMAKE_ARGS
# -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
# -DLIBUV_ROOT_DIR=${CMAKE_INSTALL_PREFIX}
# -DCASS_USE_OPENSSL=OFF
# LOG_DOWNLOAD ON
# LOG_CONFIGURE ON
# LOG_BUILD ON)
include_directories(${LIBMONGOCXX_INCLUDE_DIR})
include_directories(${LIBBSONCXX_INCLUDE_DIR})

Claudio Bisegni
committed
include_directories(chaos/common ../)
link_directories(${CMAKE_INSTALL_PREFIX}/lib64)

Claudio Bisegni
committed
QueryDataConsumer.cpp
QueryDataMsgPSConsumer.cpp
)
SET(service_src ../chaos_service_common/persistence/mongodb/MongoDBHAConnectionManager.cpp
../chaos_service_common/persistence/mongodb/MongoDBAccessor.cpp
../chaos_service_common/DriverPoolManager.cpp ../chaos_service_common/health_system/HealtManagerDirect.cpp)

Claudio Bisegni
committed
SET(service_src ${service_src} ../chaos_service_common/persistence/mongodb/mongodb_cxx/MongoDBCXXDriver.cpp)

Claudio Bisegni
committed
SET(service_src ${service_src} ../chaos_service_common/persistence/data_access/AbstractDataAccess.cpp
../chaos_service_common/persistence/data_access/AbstractPersistenceDriver.cpp
../chaos_service_common/ChaosManager.cpp
../chaos_service_common/ChaosServiceToolkit.cpp)

Claudio Bisegni
committed
SET(cnd_src ${cnd_src} cron_job/MDSCronusManager.cpp
cron_job/MDSCronJob.cpp
cron_job/management/MDSHistoryAgeingManagement.cpp)

Claudio Bisegni
committed
SET(cnd_src ${cnd_src} common/CUCommonUtility.cpp
common/LogUtility.cpp)

Claudio Bisegni
committed
api/AbstractApiGroup.cpp)

Claudio Bisegni
committed
api/logging/SubmitEntry.cpp
api/logging/SubmitEntryBase.cpp
api/logging/SearchLogEntry.cpp
api/logging/GetLogForSourceUID.cpp
api/logging/GetLogDomainForSourceUID.cpp)
api/groups/AddNode.cpp
api/groups/DeleteNode.cpp
api/groups/GetDomains.cpp
api/groups/GetNodeChilds.cpp)
api/service/ResetAll.cpp
api/service/GetAllSnapshot.cpp
api/service/RestoreSnapshot.cpp
api/service/CreateNewSnapshot.cpp

Claudio Bisegni
committed
api/service/DeleteSnapshot.cpp

Claudio Bisegni
committed
api/service/GetNodesForSnapshot.cpp
api/service/GetSnapshotDatasetsForNode.cpp

Claudio Bisegni
committed
api/service/SetSnapshotDatasetsForNode.cpp

Claudio Bisegni
committed
api/service/GetSnapshotForNode.cpp
api/service/SetVariable.cpp
api/service/RemoveVariable.cpp
api/service/RetrieveMultipleData.cpp
api/service/QueryDataCloud.cpp
api/service/DeleteDataCloud.cpp)
api/healt/ProcessHello.cpp
api/healt/ProcessBye.cpp)
SET(api_src ${api_src} api/unit_server/UnitServerApiGroup.cpp

Claudio Bisegni
committed
api/unit_server/GetDescription.cpp

Claudio Bisegni
committed
SET(api_src ${api_src} api/data_service/DataServiceApiGroup.cpp

Claudio Bisegni
committed
api/data_service/AssociationControlUnit.cpp
api/data_service/GetAssociationByDS.cpp
api/data_service/GetAllDataService.cpp
api/data_service/GetBestEndpoints.cpp)

Claudio Bisegni
committed
SET(api_src ${api_src} api/control_unit/SetInputDatasetAttributeValues.cpp

Claudio Bisegni
committed
api/control_unit/SetInstanceDescription.cpp
api/control_unit/SearchInstancesByUS.cpp

Claudio Bisegni
committed
api/control_unit/GetInstance.cpp
api/control_unit/DeleteInstance.cpp
api/control_unit/InitDeinit.cpp
api/control_unit/StartStop.cpp
api/control_unit/CopyInstance.cpp
api/control_unit/RecoverError.cpp

Claudio Bisegni
committed
api/control_unit/GetFullDescription.cpp
api/control_unit/SendStorageBurst.cpp)

Claudio Bisegni
committed
api/node/NodeCreateUnitServer.cpp
api/node/NodeGetDescription.cpp
api/node/NodeRegister.cpp

Claudio Bisegni
committed
api/node/NodeLoadCompletion.cpp
api/node/NodeSearch.cpp
api/node/UpdateProperty.cpp
api/node/UpdatePropertyDefaultValues.cpp
api/node/GetPropertyDefaultValues.cpp
api/node/ChangeNodeState.cpp
api/node/CommandGet.cpp
api/node/CommandTemplateSet.cpp
api/node/CommandTemplateGet.cpp
api/node/CommandTemplateDelete.cpp
api/node/CommandTemplateSearch.cpp
api/node/CommandTemplateSubmit.cpp
api/node/CommandInstanceSubmit.cpp
api/node/KillCurrentCommand.cpp
api/node/ClearCommandQueue.cpp
api/node/ForwardNodeRpcMessage.cpp

Claudio Bisegni
committed
api/node/GetPropertyDefaultValues.cpp
api/node/GetCommandAndTemplateDescription.cpp)

Claudio Bisegni
committed
Claudio Bisegni
committed
api/script/SearchScript.cpp
api/script/SaveScript.cpp
api/script/ManageScriptInstance.cpp
api/script/UpdateScriptOnNode.cpp
api/script/UpdateBindType.cpp)

Claudio Bisegni
committed

Claudio Bisegni
committed
api/agent/LoadAgentDescription.cpp
api/agent/ListNodeForAgent.cpp
api/agent/GetAgentForNode.cpp

Claudio Bisegni
committed
api/agent/SaveNodeAssociation.cpp
api/agent/LoadNodeAssociation.cpp
api/agent/RemoveNodeAssociation.cpp
api/agent/NodeOperation.cpp
api/agent/CheckAgentHostedProcess.cpp
api/agent/GetManagementConfiguration.cpp
api/agent/SetManagementConfiguration.cpp)

Claudio Bisegni
committed
SET(api_src ${api_src} api/agent/logging/AgentLoggingApiGroup.cpp
api/agent/logging/ManageNodeLogging.cpp)

Claudio Bisegni
committed
SET(api_src ${api_src} persistence/data_access/UnitServerDataAccess.cpp

Claudio Bisegni
committed
persistence/data_access/UtilityDataAccess.cpp

Claudio Bisegni
committed
persistence/data_access/ControlUnitDataAccess.cpp

Claudio Bisegni
committed
persistence/data_access/DataServiceDataAccess.cpp
persistence/data_access/SnapshotDataAccess.cpp
persistence/data_access/AgentDataAccess.cpp)

Claudio Bisegni
committed
SET(api_src ${api_src} persistence/mongodb/MongoDBPersistenceDriver.cpp
persistence/mongodb/MongoDBUnitServerDataAccess.cpp

Claudio Bisegni
committed
persistence/mongodb/MongoDBNodeDataAccess.cpp
persistence/mongodb/MongoDBUtilityDataAccess.cpp

Claudio Bisegni
committed
persistence/mongodb/MongoDBControlUnitDataAccess.cpp

Claudio Bisegni
committed
persistence/mongodb/MongoDBDataServiceDataAccess.cpp
persistence/mongodb/MongoDBSnapshotDataAccess.cpp
persistence/mongodb/MongoDBTreeGroupDataAccess.cpp
persistence/mongodb/MongoDBAgentDataAccess.cpp)
SET(api_src ${api_src} cache_system/CouchbaseCacheDriver.cpp)
SET(api_src ${api_src} object_storage/abstraction/ObjectStorageDataAccess.cpp)
SET(api_src ${api_src} object_storage/mongodb/MongoDBObjectStorageDataAccess.cpp
object_storage/mongodb/MongoDBObjectStorageDriver.cpp
object_storage/mongodb/ShardKeyManagement.cpp)
SET(api_src ${api_src} object_storage/mongodb_3/MongoDBObjectStorageDataAccess.cpp
object_storage/mongodb_3/NewMongoDBObjectStorageDriver.cpp
object_storage/mongodb_3/ShardKeyManagement.cpp)

Claudio Bisegni
committed
SET(posix_src object_storage/posixFile/PosixFile.cpp
object_storage/posixFile/PosixFileObjectStorageDriver.cpp
object_storage/posixFile/BsonFStream.cpp object_storage/posixFile/FileLock.cpp)
SET(api_src ${api_src} object_storage/influxDB/InfluxDB.cpp
object_storage/influxDB/InfluxDBLogStorageDriver.cpp
#object_storage/influxDB/influxdb-cpp-rest/influxdb_simple_async_api.cpp
#object_storage/influxDB/influxdb-cpp-rest/influxdb_raw_db.cpp
# object_storage/influxDB/influxdb-cpp-rest/influxdb_raw_db_utf8.cpp
)
#SET(cnd_src ${cnd_src} ${api_src} object_storage/hybdriver/ShardKeyManagement.cpp
# object_storage/hybdriver/HybBaseDriver.cpp
# object_storage/hybdriver/HybBaseDataAccess.cpp)
# SET(cnd_src ${cnd_src} object_storage/hybdriver/cassandra/CassHybObjectStorageDriver.cpp
# object_storage/hybdriver/cassandra/CassHybDataAccess.cpp)
#Worker
SET(cnd_src ${cnd_src} worker/DataWorker.cpp
worker/DeviceSharedDataWorker.cpp)
SET(cnd_src ${cnd_src} batch/MDSBatchExecutor.cpp
batch/MDSBatchCommand.cpp)

Claudio Bisegni
committed

Claudio Bisegni
committed
SET(cnd_src ${cnd_src} batch/agent/AgentAckCommand.cpp
batch/agent/AgentProcessController.cpp
batch/agent/AgentRemoveNodeSafety.cpp
batch/agent/AgentLoggingNodeManagement.cpp)
SET(cnd_src ${cnd_src} batch/node/UpdatePropertyCommand.cpp
batch/node/SendRpcCommand.cpp batch/node/NodeAckCommand.cpp)

Claudio Bisegni
committed
SET(cnd_src ${cnd_src} batch/unit_server/UnitServerAckBatchCommand.cpp
batch/unit_server/LoadUnloadControlUnit.cpp)

Claudio Bisegni
committed
SET(cnd_src ${cnd_src} batch/control_unit/RegistrationAckBatchCommand.cpp
batch/control_unit/IDSTControlUnitBatchCommand.cpp
batch/control_unit/ApplyChangeSet.cpp
batch/control_unit/RecoverError.cpp)

Claudio Bisegni
committed
SET(cnd_src ${cnd_src} batch/script/LoadInstanceOnUnitServer.cpp
batch/script/UpdateScriptOnNode.cpp)
SET(cnd_src ${cnd_src} batch/general/RestoreSnapshotBatch.cpp
batch/general/CreateSnapshotBatch.cpp)

Claudio Bisegni
committed
if(CHAOS_PROMETHEUS)
SET(cnd_src ${cnd_src} worker/DeviceSharedDataWorkerMetricCollector.cpp
cache_system/CacheDriverMetricCollector.cpp)
ADD_LIBRARY(chaos_cds STATIC ${cnd_src} ${api_src} ${service_src} ${posix_src})
TARGET_LINK_LIBRARIES(chaos_cds PRIVATE chaos_common couchbaseS.a mongoclient mongocxx bsoncxx )
ADD_LIBRARY(chaos_cds SHARED ${posix_src} ${service_src} ${api_src} ${cnd_src}) #
# set_target_properties(chaos_cds PROPERTIES VERSION 1.0.0 SOVERSION 1)

Claudio Bisegni
committed
# add_dependencies(chaos_cds mongo-cxx-driver)
# add_dependencies(chaos_cds couchbase-c-driver)
# add_dependencies(${PROJECT_NAME} mongo-cxx-driver)
FILE(GLOB files "../chaos_service_common/data/node/*.h")
INSTALL(FILES ${files} DESTINATION include/chaos_service_common/data/node/)
FILE(GLOB files "../chaos_service_common/*.h")
INSTALL(FILES ${files} DESTINATION include/chaos_service_common/)
# CheckConfigureBuild(couchbaseS libcouchbase:chaos-0.1 "-DLCB_NO_SSL=true;-DLCB_NO_TESTS=true;-DLCB_NO_TOOLS=true;-DLCB_NO_PLUGINS=true" https://github.com/amichelotti)
# CheckConfigureBuild(couchbaseS libcouchbase:release-2.10 "-DLCB_NO_SSL=true;-DLCB_NO_TESTS=true;-DLCB_NO_TOOLS=true;-DLCB_NO_PLUGINS=true" https://github.com/couchbase)
IF(BUILD_FORCE_STATIC)
SET(CMAKE_EXE_LINKER_FLAGS "-static -Wl,--whole-archive -lchaos_common -Wl,--no-whole-archive")
ENDIF()
SET(BUILD_LIBRARY boost_iostreams boost_regex)
# SET(BUILD_LIBRARY )

Andrea Michelotti
committed
SET(BUILD_LIBRARY ${BUILD_LIBRARY} lz4)

Claudio Bisegni
committed
SET(BUILD_LIBRARY ${BUILD_LIBRARY} chaos_common)
#IF(CERN_ROOT)
#SET(BUILD_LIBRARY ${BUILD_LIBRARY} chaos_driver_misc_cernroot Tree tbb)
#ENDIF()
MESG("Enable link to mongocxx and bsoncxx library")
SET(BUILD_LIBRARY ${BUILD_LIBRARY} mongocxx)
SET(BUILD_LIBRARY ${BUILD_LIBRARY} bsoncxx)

Andrea Michelotti
committed
target_compile_definitions(${PROJECT_NAME} PRIVATE USE_MONGODB3_DRIVER=1)
target_compile_definitions(chaos_cds PRIVATE USE_MONGODB3_DRIVER=1)
# MESG("Enable link to cassandra and bsoncxx library")
# SET(BUILD_LIBRARY ${BUILD_LIBRARY} uv)
# SET(BUILD_LIBRARY ${BUILD_LIBRARY} cassandra)
# target_compile_definitions(${PROJECT_NAME} PRIVATE USE_CASSANDRA_DRIVER=1)
TARGET_LINK_LIBRARIES(chaos_cds PUBLIC ${BUILD_LIBRARY} PRIVATE jsoncpp.a )

Claudio Bisegni
committed
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC chaos_cds ${BUILD_LIBRARY} )
#INSTALL_TARGETS(/bin ${PROJECT_NAME})
INSTALL(TARGETS ${PROJECT_NAME}
DESTINATION "bin"
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
INSTALL(TARGETS chaos_cds
DESTINATION "lib"
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)