libmicrohttpd now depends on gnutls on macOS.

This commit is contained in:
casey langen 2019-01-25 09:32:09 -08:00
parent 804a6d4195
commit 061299fec0

View File

@ -22,10 +22,15 @@ set (server_LINK_LIBS ${BOOST_LINK_LIBS})
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/include")
set(EXTRA_LIBS "")
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(EXTRA_LIBS "gnutls")
endif()
if (${LINK_STATICALLY} MATCHES "true")
# prefer static libraries on mac to make redist easier
find_library(MICROHTTPDLIB NAMES libmicrohttpd.a microhttpd)
target_link_libraries(server ${server_LINK_LIBS} ${MICROHTTPDLIB} z)
target_link_libraries(server ${server_LINK_LIBS} ${MICROHTTPDLIB} z ${EXTRA_LIBS})
else()
target_link_libraries(server ${server_LINK_LIBS} microhttpd z)
target_link_libraries(server ${server_LINK_LIBS} microhttpd z ${EXTRA_LIBS})
endif()