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 42bfeeabfd853d0093a0d73fe77ff415bc258dd9..c5352896e0d9e5e832066302ec65e80cb588b372 100644
(file)
--- a/
CMakeCommon/FindPython.cmake
+++ b/
CMakeCommon/FindPython.cmake
@@
-1,12
+1,26
@@
-IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
- SET(PYTHON_LIBRARY_DLL "python27_d.lib")
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+
+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()
-FIND_PACKAGE(PythonLibs)
+FILE(TO_CMAKE_PATH $ENV{PYTHON_INCLUDE} PYTHON_INCLUDE_DIR)
+FIND_PACKAGE(PythonLibs REQUIRED)
+FIND_PACKAGE(PythonInterp 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})