Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #596 from mbernasocchi/master
make cmake honor PYTHON_LIBRARY
  • Loading branch information
timlinux committed May 19, 2013
2 parents 6370aa4 + f7f3e41 commit 46b3471
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/FindPythonLibrary.cmake
Expand Up @@ -26,10 +26,10 @@

INCLUDE(CMakeFindFrameworks)

if(EXISTS PYTHON_LIBRARY)
if(EXISTS ${PYTHON_LIBRARY})
# Already in cache, be silent
set(PYTHONLIBRARY_FOUND TRUE)
else(EXISTS PYTHON_LIBRARY)
else(EXISTS ${PYTHON_LIBRARY})

set(_custom_python_fw FALSE)
if(APPLE AND PYTHON_CUSTOM_FRAMEWORK)
Expand Down Expand Up @@ -69,6 +69,7 @@ else(EXISTS PYTHON_LIBRARY)
STRING(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR})
endif(WIN32)
FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH)
set(PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE_PATH} CACHE FILEPATH "Directory holding the python.h include file")
set(PYTHONLIBRARY_FOUND TRUE)
endif(python_config)

Expand Down Expand Up @@ -109,4 +110,4 @@ else(EXISTS PYTHON_LIBRARY)
endif(PYTHONLIBRARY_FIND_REQUIRED)
endif(PYTHONLIBRARY_FOUND)

endif (EXISTS PYTHON_LIBRARY)
endif (EXISTS ${PYTHON_LIBRARY})

0 comments on commit 46b3471

Please sign in to comment.