build libunbound from external if no local libunbound or for static builds

This commit is contained in:
Riccardo Spagni 2014-10-06 15:00:06 +02:00
parent add1a608dd
commit cee87473ad
5 changed files with 270 additions and 232 deletions

View file

@ -37,25 +37,4 @@ FIND_PATH(UNBOUND_INCLUDE_DIR
/usr/
)
if(STATIC)
if(MINGW)
find_library(UNBOUND_LIBRARIES libunbound.dll.a)
else()
find_library(UNBOUND_LIBRARIES libunbound.a)
endif()
else()
find_library(UNBOUND_LIBRARIES unbound)
endif()
IF(UNBOUND_INCLUDE_DIR)
MESSAGE(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
IF(UNBOUND_LIBRARIES)
MESSAGE(STATUS "Found libunbound library")
set(UNBOUND_INCLUDE ${UNBOUND_INCLUDE_DIR})
set(UNBOUND_LIBRARY ${UNBOUND_LIBRARIES})
ELSE()
MESSAGE(FATAL_ERROR "${BoldRed}Could not find libunbound library, please make sure you have installed libunbound or libunbound-dev or the equivalent${ColourReset}")
ENDIF()
ELSE()
MESSAGE(FATAL_ERROR "${BoldRed}Could not find libunbound library, please make sure you have installed libunbound or libunbound-dev or the equivalent${ColourReset}")
ENDIF()
find_library(UNBOUND_LIBRARIES unbound)