From: vsr Date: Fri, 20 Jan 2017 11:10:12 +0000 (+0300) Subject: Patch for MacOS (from SALOME forum) X-Git-Tag: Before_python3_27062017~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=973e965c3f62b941cc3afac1729b1d99a96795cc;p=tools%2Flibbatch.git Patch for MacOS (from SALOME forum) --- diff --git a/CMakeModules/FindLibbatchPython.cmake b/CMakeModules/FindLibbatchPython.cmake index 6c3ecda..fa2900c 100644 --- a/CMakeModules/FindLibbatchPython.cmake +++ b/CMakeModules/FindLibbatchPython.cmake @@ -27,7 +27,18 @@ # 1. Load environment or any previously detected Python IF(DEFINED ENV{PYTHON_ROOT_DIR}) FILE(TO_CMAKE_PATH "$ENV{PYTHON_ROOT_DIR}" _PYTHON_ROOT_DIR_ENV) - SET(_dflt_value "${_PYTHON_ROOT_DIR_ENV}") + IF(APPLE) + SET(_dflt_value "${_PYTHON_ROOT_DIR_ENV}/Python.framework/Versions/Current") + SET(PYTHON_LIBRARY "${_PYTHON_ROOT_DIR_ENV}/Python.framework/Versions/Current/lib/libpython2.7.dylib") + SET(PYTHON_INCLUDE_DIR "${_PYTHON_ROOT_DIR_ENV}/Python.framework/Versions/Current/Headers") + LIST(APPEND CMAKE_PREFIX_PATH "${_dflt_value}") + FIND_PACKAGE(PythonLibs) + MESSAGE(STATUS "Mac Python: ${_dflt_value}") + MESSAGE(STATUS "Python libraries: ${PYTHON_LIBRARY}") + MESSAGE(STATUS "Python include dir: ${PYTHON_INCLUDE_DIR}") + ELSE(APPLE) + SET(_dflt_value "${_PYTHON_ROOT_DIR_ENV}") + ENDIF(APPLE) ELSE() # will be blank if no Python was previously loaded SET(_dflt_value "${PYTHON_ROOT_DIR_EXP}") diff --git a/src/Core/Couple.cxx b/src/Core/Couple.cxx index dddf1c9..ec78b34 100644 --- a/src/Core/Couple.cxx +++ b/src/Core/Couple.cxx @@ -30,6 +30,7 @@ */ #include "Couple.hxx" +#include using namespace std; namespace Batch {