@ -37,18 +37,12 @@
find_package ( Miniupnpc REQUIRED )
if ( DEPENDS )
message ( STATUS "Using static depends miniupnpc found at ${MINIUPNP_LIBRARIES}" )
set ( UPNP_STATIC true PARENT_SCOPE )
set ( UPNP_LIBRARIES ${ MINIUPNP_LIBRARY } PARENT_SCOPE )
else ( )
message ( STATUS "Using in-tree miniupnpc" )
add_subdirectory ( miniupnp/miniupnpc )
set_property ( TARGET libminiupnpc-static PROPERTY FOLDER "external" )
endif ( )
message ( STATUS "Using in-tree miniupnpc" )
add_subdirectory ( miniupnp/miniupnpc )
set_property ( TARGET libminiupnpc-static PROPERTY FOLDER "external" )
if ( MSVC )
set_property ( TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267" )
elseif ( NOT MSVC AND NOT DEPENDS )
elseif ( NOT MSVC )
set_property ( TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value" )
endif ( )
@ -56,7 +50,7 @@ set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
find_package ( Unbound )
if ( NOT UNBOUND_INCLUDE_DIR OR STATIC AND NOT DEPENDS )
if ( NOT UNBOUND_INCLUDE_DIR OR STATIC )
# N O T E : I f S T A T I C i s t r u e , C M A K E _ F I N D _ L I B R A R Y _ S U F F I X E S h a s b e e n r e o r d e r e d .
# u n b o u n d h a s c o n f i g t e s t s w h i c h u s e d O p e n S S L l i b r a r i e s , s o - l d l m a y n e e d t o
# b e s e t i n t h i s c a s e .
@ -69,27 +63,15 @@ if(NOT UNBOUND_INCLUDE_DIR OR STATIC AND NOT DEPENDS)
set ( UNBOUND_LIBRARY "unbound" PARENT_SCOPE )
set ( UNBOUND_LIBRARY_DIRS "${LIBEVENT2_LIBDIR}" PARENT_SCOPE )
else ( )
if ( DEPENDS )
message ( STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}" )
if ( UNBOUND_LIBRARIES )
message ( STATUS "Found libunbound library in ${UNBOUND_LIBRARIES}" )
set ( UNBOUND_STATIC true PARENT_SCOPE )
set ( UNBOUND_LIBRARY ${ UNBOUND_LIBRARIES } PARENTSCOPE )
set ( UNBOUND_LIBRARY_DIRS "" PARENT_SCOPE )
else ( )
die ( "Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent" )
endif ( )
message ( STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}" )
if ( UNBOUND_LIBRARIES )
message ( STATUS "Found libunbound shared library" )
set ( UNBOUND_STATIC false PARENT_SCOPE )
set ( UNBOUND_INCLUDE ${ UNBOUND_INCLUDE_DIR } PARENT_SCOPE )
set ( UNBOUND_LIBRARY ${ UNBOUND_LIBRARIES } PARENT_SCOPE )
set ( UNBOUND_LIBRARY_DIRS "" PARENT_SCOPE )
else ( )
message ( STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}" )
if ( UNBOUND_LIBRARIES )
message ( STATUS "Found libunbound shared library" )
set ( UNBOUND_STATIC false PARENT_SCOPE )
set ( UNBOUND_INCLUDE ${ UNBOUND_INCLUDE_DIR } PARENT_SCOPE )
set ( UNBOUND_LIBRARY ${ UNBOUND_LIBRARIES } PARENT_SCOPE )
set ( UNBOUND_LIBRARY_DIRS "" PARENT_SCOPE )
else ( )
die ( "Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent" )
endif ( )
die ( "Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent" )
endif ( )
endif ( )