git-svn-id: svn://db.shs.com.ru/pip@349 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-14 09:31:02 +00:00
parent 314fd9cd3a
commit 2d8bac319e
4 changed files with 132 additions and 111 deletions

View File

@@ -1,21 +1,21 @@
if (WIN32)
if(WIN32)
find_package(MinGW REQUIRED)
find_library(PIP_LIBRARY pip ${MINGW_LIB})
set(PIP_INCLUDES ${MINGW_INCLUDE}/pip)
set(PIP_CMG ${MINGW_BIN}/pip_cmg.exe)
else ()
else()
find_library(PIP_LIBRARY pip /usr/lib/)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
find_library(PTHREAD_LIBRARY pthread)
find_library(DL_LIBRARY dl)
find_library(UTIL_LIBRARY util)
list(APPEND PIP_LIBRARY ${PTHREAD_LIBRARY} ${DL_LIBRARY} ${UTIL_LIBRARY})
endif ()
endif()
set(PIP_INCLUDES /usr/include/pip)
set(PIP_CMG /usr/bin/pip_cmg)
endif ()
endif()
if (NOT PIP_VERSION)
if(NOT PIP_VERSION)
file(STRINGS "${PIP_INCLUDES}/pip_version_str.h" _VERSION REGEX "\".*\"")
string(REGEX MATCH "\".*\"" _VERSION ${_VERSION})
string(LENGTH ${_VERSION} SL)
@@ -23,10 +23,10 @@ if (NOT PIP_VERSION)
string(SUBSTRING ${_VERSION} 1 ${SL} _VERSION)
set(PIP_VERSION ${_VERSION} CACHE STRING "VERSION")
message(STATUS "Found PIP version ${PIP_VERSION}")
endif ()
if (PIP_FIND_VERSION VERSION_GREATER PIP_VERSION)
endif()
if(PIP_FIND_VERSION VERSION_GREATER PIP_VERSION)
message(FATAL_ERROR "PIP version ${PIP_VERSION} is available, but ${PIP_FIND_VERSION} requested!")
endif ()
endif()
include(PIPMacros)