add_executable(ceph-mgr ${mgr_srcs}
$<TARGET_OBJECTS:heap_profiler_objs>)
target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
- target_link_libraries(ceph-mgr mds osdc global
+ target_link_libraries(ceph-mgr mds osdc global-static common
${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
install(TARGETS ceph-mgr DESTINATION bin)
endif (WITH_MGR)
add_executable(ceph-mon ${ceph_mon_srcs}
$<TARGET_OBJECTS:common_texttable_obj>)
add_dependencies(ceph-mon erasure_code_plugins)
- target_link_libraries(ceph-mon mon ceph-common os global ${EXTRALIBS}
+target_link_libraries(ceph-mon mon common os global-static common
+ ${EXTRALIBS}
${CMAKE_DL_LIBS})
install(TARGETS ceph-mon DESTINATION bin)
add_executable(ceph-osd ${ceph_osd_srcs}
$<TARGET_OBJECTS:common_util_obj>)
add_dependencies(ceph-osd erasure_code_plugins)
-target_link_libraries(ceph-osd osd os global ${BLKID_LIBRARIES} ${RDMA_LIBRARIES})
+target_link_libraries(ceph-osd osd os global-static common
+ ${BLKID_LIBRARIES} ${RDMA_LIBRARIES})
if(WITH_FUSE)
target_link_libraries(ceph-osd ${FUSE_LIBRARIES})
endif()
ceph_mds.cc)
add_executable(ceph-mds ${ceph_mds_srcs}
$<TARGET_OBJECTS:common_util_obj>)
-target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global
+target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static common
${Boost_THREAD_LIBRARY})
install(TARGETS ceph-mds DESTINATION bin)
ceph_syn.cc
client/SyntheticClient.cc)
add_executable(ceph-syn ${ceph_syn_srcs})
- target_link_libraries(ceph-syn client global)
+ target_link_libraries(ceph-syn client global-static)
set(mount_ceph_srcs
mount/mount.ceph.c)
ceph_fuse.cc
client/fuse_ll.cc)
add_executable(ceph-fuse ${ceph_fuse_srcs})
- target_link_libraries(ceph-fuse ${ALLOC_LIBS} ${FUSE_LIBRARIES} client global)
+ target_link_libraries(ceph-fuse ${ALLOC_LIBS} ${FUSE_LIBRARIES}
+ client global-static)
set_target_properties(ceph-fuse PROPERTIES COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}")
install(TARGETS ceph-fuse DESTINATION bin)
install(PROGRAMS mount.fuse.ceph DESTINATION ${CMAKE_INSTALL_SBINDIR})
set(global_common_files
global_context.cc)
add_library(global_common_objs OBJECT ${global_common_files})
-add_library(global STATIC ${libglobal_srcs}
+add_library(libglobal_objs OBJECT ${libglobal_srcs})
+
+add_library(global-static STATIC
+ $<TARGET_OBJECTS:libglobal_objs>
+ $<TARGET_OBJECTS:global_common_objs>)
+
+add_library(global STATIC
+ $<TARGET_OBJECTS:libglobal_objs>
$<TARGET_OBJECTS:global_common_objs>)
target_link_libraries(global ceph-common ${DPDK_LIBRARIES} ${EXTRALIBS})