Merge pull request #3220 from phire/ubuntu14.04

CMake: Fix FindMiniupnpc for ubuntu 14.04
This commit is contained in:
Scott Mansell 2015-11-02 18:46:45 +13:00
commit 55c5ab5a21
1 changed files with 3 additions and 1 deletions

View File

@ -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)