]> git.proxmox.com Git - ceph.git/blob - ceph/src/erasure-code/shec/CMakeLists.txt
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / erasure-code / shec / CMakeLists.txt
1 #shec plugin
2
3 include_directories(.)
4
5 set(shec_utils_srcs
6 ${CMAKE_SOURCE_DIR}/src/erasure-code/ErasureCode.cc
7 ErasureCodePluginShec.cc
8 ErasureCodeShec.cc
9 ErasureCodeShecTableCache.cc
10 determinant.c)
11
12 add_library(shec_utils OBJECT ${shec_utils_srcs})
13 add_dependencies(shec_utils ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
14
15 set(ec_shec_objs
16 $<TARGET_OBJECTS:gf-complete_objs>
17 $<TARGET_OBJECTS:jerasure_objs>
18 $<TARGET_OBJECTS:shec_utils>)
19
20 add_library(ec_shec SHARED ${ec_shec_objs})
21 add_dependencies(ec_shec ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
22 set_target_properties(ec_shec PROPERTIES
23 INSTALL_RPATH "")
24 target_link_libraries(ec_shec ${EXTRALIBS})
25 install(TARGETS ec_shec DESTINATION ${erasure_plugin_dir})
26
27 # legacy libraries
28 foreach(flavor ${jerasure_legacy_flavors})
29 set(plugin_name "ec_shec_${flavor}")
30 add_library(${plugin_name} SHARED ${ec_shec_objs})
31 set_target_properties(${plugin_name} PROPERTIES
32 INSTALL_RPATH "")
33 install(TARGETS ${plugin_name} DESTINATION ${erasure_plugin_dir})
34 add_dependencies(ec_shec ${plugin_name})
35 endforeach()
36
37 if(WITH_EMBEDDED)
38 # note we rely on the fact this will always be statically linked with jerasure
39 add_library(cephd_ec_shec STATIC ${shec_utils_srcs})
40 set_target_properties(cephd_ec_shec PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
41 endif()