From d43a20f8f41b0d10b09a7cd6e1940d4eca41a125 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 24 Oct 2014 15:29:56 -0400 Subject: [PATCH] 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. --- external/CMakeLists.txt | 2 +- external/unbound/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 97bdd9af5..a7bcfebe0 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -84,7 +84,7 @@ if(NOT UNBOUND_INCLUDE_DIR OR STATIC) set(UNBOUND_STATIC true PARENT_SCOPE) set(UNBOUND_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/unbound/libunbound" 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() message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}") if(UNBOUND_LIBRARIES) diff --git a/external/unbound/CMakeLists.txt b/external/unbound/CMakeLists.txt index 08f47cc17..f17897c6b 100644 --- a/external/unbound/CMakeLists.txt +++ b/external/unbound/CMakeLists.txt @@ -178,3 +178,8 @@ if (WIN32) iphlpapi ws2_32) endif () + +# XXX: Hack for static builds. +set(LIBEVENT2_LIBDIR + "${LIBEVENT2_LIBDIR}" + PARENT_SCOPE)