-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
71 lines (65 loc) · 1.66 KB
/
Copy pathCMakeLists.txt
File metadata and controls
71 lines (65 loc) · 1.66 KB
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
70
71
#
# Copyright 2022- IBM Inc. All rights reserved
# SPDX-License-Identifier: Apache-2.0
#
SET(SOURCES
GEDS.cpp
GEDS.h
GEDSFile.h
GEDSFile.cpp
GEDSFileHandle.h
GEDSFileHandle.cpp
GEDSRemoteFileHandle.cpp
GEDSRemoteFileHandle.h
)
# Create an object lib to build both a dynamic and a static library.
add_library(geds_objlib OBJECT ${SOURCES})
set_target_properties(geds_objlib
PROPERTIES
POSITION_INDEPENDENT_CODE ON
)
target_link_libraries(geds_objlib
PUBLIC
geds_s3
${AWSSDK_LINK_LIBRARIES}
)
target_compile_options(geds_objlib PUBLIC ${GEDS_EXTRA_COMPILER_FLAGS})
target_compile_definitions(geds_objlib
PUBLIC
"HAVE_RDMA=$<BOOL:${HAVE_RDMA}>"
_POSIX_C_SOURCE=200809L
)
target_include_directories(geds_objlib
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
)
target_link_libraries(geds_objlib
PUBLIC
magic_enum::magic_enum
geds_common
geds_proto
geds_utility
geds_statistics
geds_s3
${GEDS_EXTRA_LINKER_FLAGS}
)
# Static library
add_library(libgeds STATIC $<TARGET_OBJECTS:geds_objlib>)
set_target_properties(libgeds
PROPERTIES
OUTPUT_NAME "geds"
)
target_link_libraries(libgeds PUBLIC geds_objlib)
# Dynamic library
add_library(libgeds_dynamic SHARED $<TARGET_OBJECTS:geds_objlib>)
set_target_properties(libgeds_dynamic
PROPERTIES
OUTPUT_NAME "geds"
)
target_link_libraries(libgeds_dynamic PUBLIC geds_objlib)
install(TARGETS libgeds libgeds_dynamic
COMPONENT geds)
# if(HAVE_TESTS)
# add_subdirectory(tests)
# endif()