mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
CMake: Fix FindMiniupnpc for ubuntu 14.04
Ubuntu 14.04 has miniupnpc 1.6.3 REGEX was failing because the string was empty, causing cmake to error and not generate a Makefile. This allows systems with older versions of miniupnpc to fall back to the statically linked version in externals.
This commit is contained in:
@ -6,7 +6,9 @@ find_library(MINIUPNPC_LIBRARY miniupnpc)
|
|||||||
|
|
||||||
if(MINIUPNPC_INCLUDE_DIR)
|
if(MINIUPNPC_INCLUDE_DIR)
|
||||||
file(STRINGS "${MINIUPNPC_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
|
file(STRINGS "${MINIUPNPC_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
|
||||||
|
if(MINIUPNPC_API_VERSION_STR)
|
||||||
string(REGEX REPLACE "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)" "\\1" MINIUPNPC_API_VERSION ${MINIUPNPC_API_VERSION_STR})
|
string(REGEX REPLACE "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)" "\\1" MINIUPNPC_API_VERSION ${MINIUPNPC_API_VERSION_STR})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
Reference in New Issue
Block a user