Skip to content

Commit

Permalink
Add special search paths for linux python libraries such as libpython…
Browse files Browse the repository at this point in the history
…3.5m.so
  • Loading branch information
ahundt committed Sep 29, 2017
1 parent 96ee22e commit 4810b99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build3/cmake/FindPythonLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ else()
STRING(REGEX REPLACE "^([0-9]+).*$" "\\1" _VERSION_MAJOR "${_CURRENT_VERSION}")
STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$" "\\1" _VERSION_MINOR "${_CURRENT_VERSION}")

set(_PYTHON_NAMES python)
set(_PYTHON_NAMES ${PYTHON_EXECUTABLE} python)

if (_CURRENT_VERSION MATCHES "^[0-9]+.*$")
list(APPEND _PYTHON_NAMES "python${_VERSION_MAJOR}")
Expand Down Expand Up @@ -172,7 +172,7 @@ else()

if(NOT EXISTS "${PYTHON_LIBRARY}")
set(_PYTHON_SHORT_VERSION_NO_DOT "${_PYTHON_MAJOR_VERSION}${_PYTHON_MINOR_VERSION}")
set(_PYTHON_LIBRARY_NAMES python${_PYTHON_SHORT_VERSION} python${_PYTHON_SHORT_VERSION_NO_DOT})
set(_PYTHON_LIBRARY_NAMES python${_PYTHON_SHORT_VERSION} python${_PYTHON_SHORT_VERSION_NO_DOT} python${_PYTHON_SHORT_VERSION}m python${_PYTHON_SHORT_VERSION_NO_DOT}m)
FIND_LIBRARY(PYTHON_LIBRARY
NAMES ${_PYTHON_LIBRARY_NAMES}
PATH_SUFFIXES
Expand Down

0 comments on commit 4810b99

Please sign in to comment.