mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
Find miniupnpc library as well as header
This commit is contained in:
parent
3d066ea1b8
commit
959843ee9c
@ -357,7 +357,7 @@ if (WITH_BINARY)
|
||||
endif ()
|
||||
|
||||
if (WITH_UPNP)
|
||||
target_link_libraries("${PROJECT_NAME}" "miniupnpc")
|
||||
target_link_libraries("${PROJECT_NAME}" "${MINIUPNPC_LIBRARY}")
|
||||
endif ()
|
||||
|
||||
# FindBoost pulls pthread for thread which is broken for static linking at least on Ubuntu 15.04
|
||||
|
@ -1,6 +1,6 @@
|
||||
# - Find MINIUPNPC
|
||||
|
||||
if(MINIUPNPC_INCLUDE_DIR)
|
||||
if(MINIUPNPC_INCLUDE_DIR AND MINIUPNPC_LIBRARY)
|
||||
set(MINIUPNPC_FOUND TRUE)
|
||||
|
||||
else()
|
||||
@ -11,15 +11,18 @@ else()
|
||||
$ENV{SystemDrive}
|
||||
${PROJECT_SOURCE_DIR}/../..
|
||||
)
|
||||
|
||||
if(MINIUPNPC_INCLUDE_DIR)
|
||||
|
||||
find_library(MINIUPNPC_LIBRARY miniupnpc)
|
||||
|
||||
if(MINIUPNPC_INCLUDE_DIR AND MINIUPNPC_LIBRARY)
|
||||
set(MINIUPNPC_FOUND TRUE)
|
||||
message(STATUS "Found MiniUPnP headers: ${MINIUPNPC_INCLUDE_DIR}")
|
||||
message(STATUS "Found MiniUPnP library: ${MINIUPNPC_LIBRARY}")
|
||||
else()
|
||||
set(MINIUPNPC_FOUND FALSE)
|
||||
message(STATUS "MiniUPnP not found.")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MINIUPNPC_INCLUDE_DIR)
|
||||
mark_as_advanced(MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY)
|
||||
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user