Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Union of validator and filter functionalities.
[modules/shaper.git]
/
CMakeCommon
/
FindPython.cmake
diff --git
a/CMakeCommon/FindPython.cmake
b/CMakeCommon/FindPython.cmake
index b1aa8c5315b803b449d7e5360729cd98b4638169..c5352896e0d9e5e832066302ec65e80cb588b372 100644
(file)
--- a/
CMakeCommon/FindPython.cmake
+++ b/
CMakeCommon/FindPython.cmake
@@
-1,16
+1,26
@@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
- SET(PYTHON_LIBRARY_DLL "python27_d.lib")
+
+IF(WIN32)
+ IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ SET(PYTHON_LIBRARY_FILE "python27_d.lib")
+ ElSE()
+ SET(PYTHON_LIBRARY_FILE "python27.lib")
+ ENDIF()
ElSE()
ElSE()
-
SET(PYTHON_LIBRARY_DLL "python27.lib
")
+
SET(PYTHON_LIBRARY_FILE "libpython2.7.so
")
ENDIF()
ENDIF()
-FILE(TO_CMAKE_PATH "$ENV{PYTHON_LIB_DIR}/${PYTHON_LIBRARY_DLL}" PYTHON_LIBRARY)
-FILE(TO_CMAKE_PATH $ENV{PYTHON_INC_DIR} PYTHON_INCLUDE_DIR)
+IF(WIN32)
+ FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/libs/${PYTHON_LIBRARY_FILE}" PYTHON_LIBRARY)
+ElSE()
+ FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/lib/${PYTHON_LIBRARY_FILE}" PYTHON_LIBRARY)
+ENDIF()
-# TOOD: Clean a mess with python interpreter
-
# FIND_PACKAGE(PythonInterp
)
-FIND_PACKAGE(Python
Libs
)
+FILE(TO_CMAKE_PATH $ENV{PYTHON_INCLUDE} PYTHON_INCLUDE_DIR)
+
FIND_PACKAGE(PythonLibs REQUIRED
)
+FIND_PACKAGE(Python
Interp REQUIRED
)
-INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
+#MESSAGE(STATUS "PYTHON_LIBRARIES: " ${PYTHON_LIBRARIES})
+#MESSAGE(STATUS "PYTHON_INCLUDE_DIR: " ${PYTHON_INCLUDE_DIR})