File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ if (WITH_BINARY)
357357 endif ()
358358
359359 if (WITH_UPNP)
360- target_link_libraries ("${PROJECT_NAME } " "miniupnpc " )
360+ target_link_libraries ("${PROJECT_NAME } " "${MINIUPNPC_LIBRARY} " )
361361 endif ()
362362
363363 # FindBoost pulls pthread for thread which is broken for static linking at least on Ubuntu 15.04
Original file line number Diff line number Diff line change 11# - Find MINIUPNPC
22
3- if (MINIUPNPC_INCLUDE_DIR)
3+ if (MINIUPNPC_INCLUDE_DIR AND MINIUPNPC_LIBRARY )
44 set (MINIUPNPC_FOUND TRUE )
55
66else ()
@@ -11,15 +11,18 @@ else()
1111 $ENV{SystemDrive}
1212 ${PROJECT_SOURCE_DIR } /../..
1313 )
14-
15- if (MINIUPNPC_INCLUDE_DIR)
14+
15+ find_library (MINIUPNPC_LIBRARY miniupnpc )
16+
17+ if (MINIUPNPC_INCLUDE_DIR AND MINIUPNPC_LIBRARY)
1618 set (MINIUPNPC_FOUND TRUE )
1719 message (STATUS "Found MiniUPnP headers: ${MINIUPNPC_INCLUDE_DIR} " )
20+ message (STATUS "Found MiniUPnP library: ${MINIUPNPC_LIBRARY} " )
1821 else ()
1922 set (MINIUPNPC_FOUND FALSE )
2023 message (STATUS "MiniUPnP not found." )
2124 endif ()
2225
23- mark_as_advanced (MINIUPNPC_INCLUDE_DIR )
26+ mark_as_advanced (MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY )
2427
2528endif ()
You can’t perform that action at this time.
0 commit comments