]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
Fix PYTHON variables for Apple case
authorGilles DAVID <gilles-g.david@edf.fr>
Fri, 28 Apr 2017 16:34:20 +0000 (18:34 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Fri, 28 Apr 2017 16:34:20 +0000 (18:34 +0200)
cmake/FindSalomePythonLibs.cmake

index c8142983966144d23bc071c04d1d8ad22ff01b3a..dc244f799fed6c5f338224a85bc4bc7588087d3c 100644 (file)
@@ -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()