Skip to content

Commit

Permalink
[344] Detect libanl in cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Feb 20, 2017
1 parent 6f45ab9 commit 8406c08
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ add_executable(mosquitto ${MOSQ_SRCS})

set (MOSQ_LIBS ${MOSQ_LIBS} ${OPENSSL_LIBRARIES})

# Check for getaddrinfo_a
include(CheckLibraryExists)
check_library_exists(anl getaddrinfo_a "" HAVE_GETADDRINFO_A)
if (HAVE_GETADDRINFO_A)
add_definitions(-DHAVE_GETADDRINFO_A)
set (MOSQ_LIBS ${MOSQ_LIBS} anl)
endif (HAVE_GETADDRINFO_A)



if (UNIX)
if (APPLE)
set (MOSQ_LIBS ${MOSQ_LIBS} dl m)
Expand Down

0 comments on commit 8406c08

Please sign in to comment.