git-svn-id: svn://db.shs.com.ru/pip@978 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -66,15 +66,21 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT PIP_VERSION)
|
if(NOT PIP_VERSION)
|
||||||
file(STRINGS "${PIP_INCLUDES}/pip_version_str.h" _VERSION REGEX "\".*\"")
|
include(CheckSymbolExists)
|
||||||
string(REGEX MATCH "\".*\"" _VERSION ${_VERSION})
|
check_symbol_exists(PIP_VERSION_NAME "${PIP_INCLUDES}/piversion.h" HAVE_PIP_VERSION)
|
||||||
string(LENGTH ${_VERSION} SL)
|
if (HAVE_PIP_VERSION)
|
||||||
math(EXPR SL ${SL}-2)
|
file(STRINGS "${PIP_INCLUDES}/piversion.h" _VERSION REGEX "^[ \t]*#define[ \t]+PIP_VERSION_NAME+[ \t]+.*$")
|
||||||
string(SUBSTRING ${_VERSION} 1 ${SL} _VERSION)
|
string(REGEX MATCH "\".*\"" _VERSION ${_VERSION})
|
||||||
set(PIP_VERSION ${_VERSION} CACHE STRING "VERSION")
|
string(LENGTH ${_VERSION} SL)
|
||||||
if (NOT _PIP_MSG)
|
math(EXPR SL ${SL}-2)
|
||||||
set(_PIP_MSG 1 CACHE BOOL "msg_pip" FORCE)
|
string(SUBSTRING ${_VERSION} 1 ${SL} _VERSION)
|
||||||
message(STATUS "Found PIP version ${PIP_VERSION} (${PIP_LIBRARY})")
|
set(PIP_VERSION ${_VERSION} CACHE STRING "VERSION")
|
||||||
|
if (NOT _PIP_MSG)
|
||||||
|
set(_PIP_MSG 1 CACHE BOOL "msg_pip" FORCE)
|
||||||
|
message(STATUS "Found PIP version ${PIP_VERSION} (${PIP_LIBRARY})")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "PIP not found")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(PIP_FIND_VERSION VERSION_GREATER PIP_VERSION)
|
if(PIP_FIND_VERSION VERSION_GREATER PIP_VERSION)
|
||||||
|
|||||||
Reference in New Issue
Block a user