Skip to content

Commit

Permalink
cmake: link executables against ceph-common
Browse files Browse the repository at this point in the history
so they can have access to libstdc++ if it is linked statically.

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Dec 11, 2017
1 parent 942a7e3 commit 46dca5d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ if (WITH_MGR)
add_executable(ceph-mgr ${mgr_srcs}
$<TARGET_OBJECTS:heap_profiler_objs>)
target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}")
target_link_libraries(ceph-mgr osdc client global-static common
target_link_libraries(ceph-mgr osdc client global-static ceph-common
Boost::python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
install(TARGETS ceph-mgr DESTINATION bin)
endif (WITH_MGR)
Expand Down Expand Up @@ -826,7 +826,7 @@ set(ceph_mon_srcs
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 common os global-static common
target_link_libraries(ceph-mon mon os global-static ceph-common
${EXTRALIBS}
${CMAKE_DL_LIBS})
install(TARGETS ceph-mon DESTINATION bin)
Expand Down Expand Up @@ -857,7 +857,7 @@ set(ceph_osd_srcs
ceph_osd.cc)
add_executable(ceph-osd ${ceph_osd_srcs})
add_dependencies(ceph-osd erasure_code_plugins)
target_link_libraries(ceph-osd osd os global-static common
target_link_libraries(ceph-osd osd os global-static ceph-common
${BLKID_LIBRARIES} ${RDMA_LIBRARIES})
if(WITH_FUSE)
target_link_libraries(ceph-osd ${FUSE_LIBRARIES})
Expand All @@ -868,7 +868,7 @@ add_subdirectory(mds)
set(ceph_mds_srcs
ceph_mds.cc)
add_executable(ceph-mds ${ceph_mds_srcs})
target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static common
target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static ceph-common
Boost::thread)
install(TARGETS ceph-mds DESTINATION bin)

Expand Down Expand Up @@ -992,7 +992,7 @@ if(WITH_LIBCEPHFS)
ceph_syn.cc
client/SyntheticClient.cc)
add_executable(ceph-syn ${ceph_syn_srcs})
target_link_libraries(ceph-syn client global-static common)
target_link_libraries(ceph-syn client global-static ceph-common)

set(mount_ceph_srcs
mount/mount.ceph.c)
Expand All @@ -1013,7 +1013,7 @@ if(WITH_FUSE)
client/fuse_ll.cc)
add_executable(ceph-fuse ${ceph_fuse_srcs})
target_link_libraries(ceph-fuse ${ALLOC_LIBS} ${FUSE_LIBRARIES}
client common global-static)
client ceph-common 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})
Expand Down

0 comments on commit 46dca5d

Please sign in to comment.