From: Gilles DAVID Date: Fri, 28 Apr 2017 16:34:20 +0000 (+0200) Subject: Fix PYTHON variables for Apple case X-Git-Tag: V9_0_0~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17f807721a534001d60888d67fe841e454a02472;p=tools%2Fconfiguration.git Fix PYTHON variables for Apple case --- diff --git a/cmake/FindSalomePythonLibs.cmake b/cmake/FindSalomePythonLibs.cmake index c814298..dc244f7 100644 --- a/cmake/FindSalomePythonLibs.cmake +++ b/cmake/FindSalomePythonLibs.cmake @@ -44,10 +44,10 @@ IF(APPLE) MESSAGE(SEND_ERROR "python-config executable not found, but python is required.") ENDIF() EXECUTE_PROCESS(COMMAND ${PYTHON_CONFIG_EXECUTABLE} --prefix OUTPUT_VARIABLE python_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) - SET(PYTHON_INCLUDE_DIR ${python_prefix}/include/python2.7) - SET(PYTHON_LIBRARY ${python_prefix}/lib/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX}) - SET(PYTHON_MAJOR_VERSION 2) - SET(PYTHON_MINOR_VERSION 7) + SET(PYTHON_INCLUDE_DIR ${python_prefix}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + SET(PYTHON_LIBRARY ${python_prefix}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX}) + SET(PYTHON_MAJOR_VERSION ${PYTHON_VERSION_MAJOR}) + SET(PYTHON_MINOR_VERSION ${PYTHON_VERSION_MINOR}) MESSAGE(STATUS "Python libraries: ${PYTHON_LIBRARY}") MESSAGE(STATUS "Python include dir: ${PYTHON_INCLUDE_DIR}") ENDIF()