From 17f807721a534001d60888d67fe841e454a02472 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Fri, 28 Apr 2017 18:34:20 +0200 Subject: [PATCH] Fix PYTHON variables for Apple case --- cmake/FindSalomePythonLibs.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() -- 2.39.2