mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
cmake: only fallback to vendored miniupnpc
This commit is contained in:
parent
b6a029f222
commit
7ce309b421
@ -37,7 +37,7 @@ set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY})
|
|||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(
|
find_package_handle_standard_args(
|
||||||
MiniUPnPc DEFAULT_MSG
|
Miniupnpc DEFAULT_MSG
|
||||||
MINIUPNP_INCLUDE_DIR
|
MINIUPNP_INCLUDE_DIR
|
||||||
MINIUPNP_LIBRARY
|
MINIUPNP_LIBRARY
|
||||||
)
|
)
|
||||||
|
6
external/CMakeLists.txt
vendored
6
external/CMakeLists.txt
vendored
@ -35,8 +35,9 @@
|
|||||||
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
|
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
|
||||||
# others.
|
# others.
|
||||||
|
|
||||||
find_package(Miniupnpc REQUIRED)
|
find_package(Miniupnpc)
|
||||||
|
|
||||||
|
if(NOT MINIUPNP_FOUND)
|
||||||
message(STATUS "Using in-tree miniupnpc")
|
message(STATUS "Using in-tree miniupnpc")
|
||||||
set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
|
set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
|
||||||
add_subdirectory(miniupnp/miniupnpc)
|
add_subdirectory(miniupnp/miniupnpc)
|
||||||
@ -51,7 +52,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
|||||||
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
|
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
set(MINIUPNP_LIBRARY "libminiupnpc-static" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Unbound)
|
find_package(Unbound)
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ target_link_libraries(p2p
|
|||||||
version
|
version
|
||||||
cryptonote_core
|
cryptonote_core
|
||||||
net
|
net
|
||||||
${UPNP_LIBRARIES}
|
${MINIUPNP_LIBRARY}
|
||||||
${Boost_CHRONO_LIBRARY}
|
${Boost_CHRONO_LIBRARY}
|
||||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||||
${Boost_FILESYSTEM_LIBRARY}
|
${Boost_FILESYSTEM_LIBRARY}
|
||||||
|
Loading…
Reference in New Issue
Block a user