diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e63a90d1895..a95b7bc5c63c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -570,6 +570,10 @@ if(MINIUPNP_FOUND) target_include_directories(pivxd PUBLIC ${MINIUPNP_INCLUDE_DIR}) endif() +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + target_link_libraries(pivxd "-framework Cocoa") +endif() + target_link_libraries(pivxd ${sodium_LIBRARY_RELEASE} -ldl -lpthread) add_subdirectory(src/qt) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 51aa21c3ca00..18825b0e4ac4 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -173,6 +173,10 @@ if(MINIUPNP_FOUND) target_include_directories(test_pivx PRIVATE ${MINIUPNP_INCLUDE_DIR}) endif() +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + target_link_libraries(test_pivx PRIVATE "-framework Cocoa") +endif() + target_link_libraries(test_pivx PRIVATE ${sodium_LIBRARY_RELEASE} -ldl -lpthread) enable_testing()