mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
CMake: simplify FindMiniupnpc.cmake
miniupnpc.h provides MINIUPNPC_API_VERSION since 1.7 and we require 1.7 or later, so there is no reason to have version detection code for older versions.
This commit is contained in:
@ -690,19 +690,17 @@ if(USE_UPNP)
|
||||
if(NOT APPLE AND NOT ANDROID)
|
||||
include(FindMiniupnpc)
|
||||
endif()
|
||||
if(MINIUPNP_FOUND AND (MINIUPNPC_VERSION_1_7_OR_HIGHER OR MINIUPNPC_VERSION_API14_OR_HIGHER))
|
||||
if(MINIUPNPC_FOUND AND MINIUPNPC_API_VERSION GREATER 8)
|
||||
message("Using shared miniupnpc")
|
||||
include_directories(${MINIUPNP_INCLUDE_DIR})
|
||||
if (MINIUPNPC_VERSION_API14_OR_HIGHER)
|
||||
add_definitions(-DUPNPDISCOVER_HAS_TTL)
|
||||
endif()
|
||||
else()
|
||||
message("Using static miniupnpc from Externals")
|
||||
add_subdirectory(Externals/miniupnpc)
|
||||
include_directories(Externals/miniupnpc/src)
|
||||
set(MINIUPNPC_INCLUDE_DIRS Externals/miniupnpc/src)
|
||||
set(MINIUPNPC_LIBRARIES miniupnpc)
|
||||
endif()
|
||||
add_definitions(-DUSE_UPNP)
|
||||
list(APPEND LIBS miniupnpc)
|
||||
include_directories(${MINIUPNPC_INCLUDE_DIRS})
|
||||
list(APPEND LIBS ${MINIUPNPC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(NOT APPLE AND NOT ANDROID)
|
||||
|
Reference in New Issue
Block a user