Skip to content

Commit

Permalink
linux
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Jan 23, 2022
1 parent 93248c1 commit f95394e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rdsn
Submodule rdsn updated 1 files
+5 −1 src/utils/CMakeLists.txt
19 changes: 18 additions & 1 deletion src/client_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ target_include_directories(pegasus_client_impl_objects PUBLIC $<TARGET_PROPERTY:
#
# link the static lib of pegasus_client: combine pegasus_client_impl, pegasus_base, etc into a single static lib
set(pegasus_client_static_lib ${CMAKE_CURRENT_BINARY_DIR}/libpegasus_client_static.a)
if (APPLE)
add_custom_target(pre_combine_lib
COMMAND ar -x ${DSN_ROOT}/lib/libdsn_utils.a)
endif()
add_custom_target(combine_lib
COMMAND ar -x ${DSN_ROOT}/lib/libdsn_utils.a
COMMAND ar -x ${DSN_ROOT}/lib/libdsn_runtime.a
COMMAND ar -x ${DSN_ROOT}/lib/libdsn_client.a
COMMAND ar -x ${DSN_ROOT}/lib/libdsn_replication_common.a
Expand All @@ -48,3 +51,17 @@ set_target_properties(pegasus_client_static
PROPERTIES
IMPORTED_LOCATION ${pegasus_client_static_lib})
install(FILES ${pegasus_client_static_lib} DESTINATION "lib")

if (NOT APPLE)
# link the shared lib of pegasus client
add_library(pegasus_client_shared SHARED $<TARGET_OBJECTS:pegasus_client_impl_objects>)
target_link_libraries(pegasus_client_shared PRIVATE
pegasus_base
dsn_runtime
dsn_utils
dsn_client
dsn_replication_common
thrift)
install(TARGETS pegasus_client_shared DESTINATION "lib")
endif()

0 comments on commit f95394e

Please sign in to comment.