Skip to content

Commit 35acac1

Browse files
committed
cmakeL: macOS: libs
1 parent 585a321 commit 35acac1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ project(libipfs_go)
33

44
if(APPLE)
55
set(GOOS "darwin")
6+
find_library(SECURITY_FRAMEWORK Security REQUIRED)
7+
find_library(RESOLV_LIBRARY resolv REQUIRED)
68
elseif(UNIX)
79
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
810
set(GOOS "freebsd")
@@ -81,4 +83,11 @@ set_target_properties(libipfs PROPERTIES
8183
IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${GO_OUT}
8284
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}
8385
)
86+
87+
if(APPLE)
88+
set_target_properties(libipfs PROPERTIES
89+
INTERFACE_LINK_LIBRARIES "${SECURITY_FRAMEWORK};${RESOLV_LIBRARY}"
90+
)
91+
endif()
92+
8493
add_dependencies(libipfs libipfs_build)

0 commit comments

Comments
 (0)