diff --git a/src/plugins/server/CMakeLists.txt b/src/plugins/server/CMakeLists.txt index ef211b5b0..8b6cc8cc3 100644 --- a/src/plugins/server/CMakeLists.txt +++ b/src/plugins/server/CMakeLists.txt @@ -15,15 +15,15 @@ set (server_LINK_LIBS ${Boost_LIBRARIES}) include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/include") include_directories(${Boost_INCLUDE_DIRS}) -ensure_library_exists(microhttpd) - -# if (${LINK_STATICALLY} MATCHES "true") -# find_library(MICROHTTPDLIB NAMES libmicrohttpd.a) -# target_link_libraries(server ${server_LINK_LIBS} ${MICROHTTPDLIB}) -# else() +if (${LINK_STATICALLY} MATCHES "true") + find_library(LIBMICROHTTPD NAMES libmicrohttpd.a) + find_library(LIBZ NAMES libz.a) + target_link_libraries(server ${server_LINK_LIBS} ${LIBZ} ${LIBMICROHTTPD}) +else() + ensure_library_exists(microhttpd) set(EXTRA_LIBS "") if (CMAKE_SYSTEM_NAME MATCHES "Darwin") set(EXTRA_LIBS "gnutls") endif() target_link_libraries(server ${server_LINK_LIBS} microhttpd z ${EXTRA_LIBS}) -# endif() +endif()