cmake: install erasure plugins into ${pkglibdir}/erasure-code

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-06-01 11:14:49 +08:00
parent 225f345642
commit 4f05601730
5 changed files with 15 additions and 12 deletions

View File

@ -1,4 +1,7 @@
## erasure code plugins
set(erasure_plugin_dir ${CMAKE_INSTALL_PKGLIBDIR}/erasure-code)
#jerasure subdir must be before shec so jerasure & neon obj libs are declared
include_directories(jerasure/jerasure/include)
include_directories(jerasure/gf-complete/include)

View File

@ -55,4 +55,4 @@ add_library(ec_isa SHARED ${isa_srcs})
add_dependencies(ec_isa ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_isa ${EXTRALIBS})
set_target_properties(ec_isa PROPERTIES VERSION 2.14.0 SOVERSION 2)
install(TARGETS ec_isa DESTINATION lib/erasure-code)
install(TARGETS ec_isa DESTINATION ${erasure_plugin_dir})

View File

@ -33,7 +33,7 @@ add_library(ec_jerasure_generic SHARED
add_dependencies(ec_jerasure_generic ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_jerasure_generic crush ${EXTRALIBS})
set_target_properties(ec_jerasure_generic PROPERTIES VERSION 2.0.0 SOVERSION 2)
install(TARGETS ec_jerasure_generic DESTINATION lib/erasure-code)
install(TARGETS ec_jerasure_generic DESTINATION ${erasure_plugin_dir})
# ec_jerasure_neon
#TODO:build libec_jerasure_neon library on an ARM machine
@ -57,7 +57,7 @@ if(ARM_NEON OR ARM_NEON2)
target_link_libraries(ec_jerasure_neon crush pthread ${EXTRALIBS})
set_target_properties(ec_jerasure_neon PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${ARM_NEON_FLAGS})
install(TARGETS ec_jerasure_neon DESTINATION lib/erasure-code)
install(TARGETS ec_jerasure_neon DESTINATION ${erasure_plugin_dir})
endif(ARM_NEON OR ARM_NEON2)
# ec_jerasure_sse3
@ -71,7 +71,7 @@ if(INTEL_SSE)
target_link_libraries(ec_jerasure_sse3 crush ${EXTRALIBS})
set_target_properties(ec_jerasure_sse3 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE3_FLAGS})
install(TARGETS ec_jerasure_sse3 DESTINATION lib/erasure-code)
install(TARGETS ec_jerasure_sse3 DESTINATION ${erasure_plugin_dir})
endif(INTEL_SSE)
# ec_jerasure_sse4
@ -85,11 +85,11 @@ if(INTEL_SSE4_1)
target_link_libraries(ec_jerasure_sse4 crush ${EXTRALIBS})
set_target_properties(ec_jerasure_sse4 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE4_FLAGS})
install(TARGETS ec_jerasure_sse4 DESTINATION lib/erasure-code)
install(TARGETS ec_jerasure_sse4 DESTINATION ${erasure_plugin_dir})
endif(INTEL_SSE4_1)
add_library(ec_jerasure SHARED ErasureCodePluginSelectJerasure.cc)
add_dependencies(ec_jerasure ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_jerasure ${EXTRALIBS})
set_target_properties(ec_jerasure PROPERTIES VERSION 2.0.0 SOVERSION 2)
install(TARGETS ec_jerasure DESTINATION lib/erasure-code)
install(TARGETS ec_jerasure DESTINATION ${erasure_plugin_dir})

View File

@ -11,4 +11,4 @@ add_library(ec_lrc SHARED ${lrc_srcs})
add_dependencies(ec_lrc ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_lrc crush json_spirit)
set_target_properties(ec_lrc PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS ec_lrc DESTINATION lib/erasure-code)
install(TARGETS ec_lrc DESTINATION ${erasure_plugin_dir})

View File

@ -18,7 +18,7 @@ add_library(ec_shec_generic SHARED
target_link_libraries(ec_shec_generic crush pthread)
add_dependencies(ec_shec_generic ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
set_target_properties(ec_shec_generic PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS ec_shec_generic DESTINATION lib/erasure-code)
install(TARGETS ec_shec_generic DESTINATION ${erasure_plugin_dir})
# ec_shec_neon
#TODO:build libec_shec_neon library on an ARM machine
@ -33,7 +33,7 @@ if(ARM_NEON OR ARM_NEON2)
target_link_libraries(ec_shec_neon ${EXTRALIBS})
set_target_properties(ec_shec_neon PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${ARM_NEON_FLAGS})
install(TARGETS ec_shec_neon DESTINATION lib/erasure-code)
install(TARGETS ec_shec_neon DESTINATION ${erasure_plugin_dir})
endif(ARM_NEON OR ARM_NEON2)
# ec_shec_sse3
@ -45,7 +45,7 @@ if(INTEL_SSE)
target_link_libraries(ec_shec_sse3 crush ${EXTRALIBS})
set_target_properties(ec_shec_sse3 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE3_FLAGS})
install(TARGETS ec_shec_sse3 DESTINATION lib/erasure-code)
install(TARGETS ec_shec_sse3 DESTINATION ${erasure_plugin_dir})
endif(INTEL_SSE)
# ec_shec_sse4
@ -57,11 +57,11 @@ if(INTEL_SSE4_1)
target_link_libraries(ec_shec_sse4 crush ${EXTRALIBS})
set_target_properties(ec_shec_sse4 PROPERTIES VERSION 2.0.0 SOVERSION 2
COMPILE_FLAGS ${SSE4_FLAGS})
install(TARGETS ec_shec_sse4 DESTINATION lib/erasure-code)
install(TARGETS ec_shec_sse4 DESTINATION ${erasure_plugin_dir})
endif(INTEL_SSE4_1)
add_library(ec_shec SHARED ErasureCodePluginSelectShec.cc)
add_dependencies(ec_shec ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ec_shec ${EXTRALIBS})
set_target_properties(ec_shec PROPERTIES VERSION 2.0.0 SOVERSION 2)
install(TARGETS ec_shec DESTINATION lib/erasure-code)
install(TARGETS ec_shec DESTINATION ${erasure_plugin_dir})