Skip to content

Commit 5cb3760

Browse files
committed
cmake: ranlib on darwin
1 parent e53850c commit 5cb3760

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ set_target_properties(libipfs PROPERTIES
128128
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}
129129
)
130130

131+
if(APPLE AND DEPENDS)
132+
add_custom_command(TARGET libipfs_build POST_BUILD
133+
COMMAND ${CMAKE_RANLIB} ${CMAKE_CURRENT_BINARY_DIR}/${GO_OUT}
134+
COMMENT "Running ranlib on Darwin archive to generate symbol table"
135+
)
136+
endif()
137+
131138
if(APPLE)
132139
set_target_properties(libipfs PROPERTIES
133140
INTERFACE_LINK_LIBRARIES "${SECURITY_FRAMEWORK};${RESOLV_LIBRARY}"

0 commit comments

Comments
 (0)