forked from IntelLabs/vdms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (57 loc) · 2.66 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
65
66
67
68
69
cmake_minimum_required (VERSION 3.17)
IF(CODE_COVERAGE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -coverage -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -coverage -fprofile-arcs -ftest-coverage")
enable_testing()
ENDIF()
project(vdms_application)
add_compile_options(-g -fPIC)
find_package( OpenCV REQUIRED )
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/utils/src/api_schema/createApiString.py ${CMAKE_CURRENT_SOURCE_DIR}/utils/src/api_schema/api_schema.json ${CMAKE_CURRENT_BINARY_DIR}/APISchema.h)
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS utils/src/protobuf/partitionerMessages.proto utils/src/protobuf/pmgdMessages.proto utils/src/protobuf/queryMessage.proto)
add_library(vdms_protobuf SHARED ${PROTO_SRCS} ${PROTO_HDRS})
option(CLIENT "Built client library." OFF)
if (CLIENT)
add_definitions("-D CLIENT")
include_directories(client/cpp)
include_directories(utils)
add_subdirectory(utils)
add_subdirectory(client/cpp)
else()
add_subdirectory(src/pmgd)
add_subdirectory(utils)
add_subdirectory(tests)
add_subdirectory(src/vcl)
add_subdirectory(client/cpp)
add_subdirectory(ext/custom_vcl)
add_subdirectory(distributed)
link_directories(/usr/local/lib /usr/lib/x86_64-linux-gnu/)
include_directories(/usr/include/jsoncpp utils/include/ src/pmgd/include src/pmgd/util include/ src/vcl /usr/include ${CMAKE_CURRENT_BINARY_DIR}/utils/src/protobuf)
add_library(dms SHARED
src/BoundingBoxCommand.cc
src/BlobCommand.cc
src/CommunicationManager.cc
src/DescriptorsCommand.cc
src/DescriptorsManager.cc
src/ExceptionsCommand.cc
src/ImageCommand.cc
src/PMGDIterators.cc
src/PMGDQuery.cc
src/PMGDQueryHandler.cc
src/QueryHandler.cc
src/QueryMessage.cc
src/RSCommand.cc
src/SearchExpression.cc
src/Server.cc
src/VDMSConfig.cc
src/VideoCommand.cc
src/AutoDeleteNode.cc
${PROTO_SRCS} ${PROTO_HDRS}
)
target_link_libraries(dms vcl pmgd pmgd-util protobuf vdms-utils pthread)
add_executable(vdms src/vdms.cc)
target_link_libraries(vdms dms vdms_protobuf vcl tiledb faiss flinng jsoncpp ${OpenCV_LIBS})
endif ()