unbound: plumb the libdir up

This is necessary for static builds where the linking is passed around
to dependent targets, but the library is lost.
This commit is contained in:
Ben Boeckel 2014-10-24 15:29:56 -04:00
parent 7d708e4223
commit d43a20f8f4
2 changed files with 6 additions and 1 deletions

View file

@ -84,7 +84,7 @@ if(NOT UNBOUND_INCLUDE_DIR OR STATIC)
set(UNBOUND_STATIC true PARENT_SCOPE) set(UNBOUND_STATIC true PARENT_SCOPE)
set(UNBOUND_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/unbound/libunbound" PARENT_SCOPE) set(UNBOUND_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/unbound/libunbound" PARENT_SCOPE)
set(UNBOUND_LIBRARY "unbound" PARENT_SCOPE) set(UNBOUND_LIBRARY "unbound" PARENT_SCOPE)
set(UNBOUND_LIBRARY_DIRS "${LIBEVENT2_LIBRARY_DIRS}" PARENT_SCOPE) set(UNBOUND_LIBRARY_DIRS "${LIBEVENT2_LIBDIR}" PARENT_SCOPE)
else() else()
message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}") message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
if(UNBOUND_LIBRARIES) if(UNBOUND_LIBRARIES)

View file

@ -178,3 +178,8 @@ if (WIN32)
iphlpapi iphlpapi
ws2_32) ws2_32)
endif () endif ()
# XXX: Hack for static builds.
set(LIBEVENT2_LIBDIR
"${LIBEVENT2_LIBDIR}"
PARENT_SCOPE)