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 364fc028b0920080d2500a38c506d25faa494d9c..c5352896e0d9e5e832066302ec65e80cb588b372 100644
(file)
--- a/
CMakeCommon/FindPython.cmake
+++ b/
CMakeCommon/FindPython.cmake
@@
-1,17
+1,26
@@
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
IF(WIN32)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
IF(WIN32)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
- SET(PYTHON_LIBRARY_
DLL
"python27_d.lib")
+ SET(PYTHON_LIBRARY_
FILE
"python27_d.lib")
ElSE()
ElSE()
- SET(PYTHON_LIBRARY_
DLL
"python27.lib")
+ SET(PYTHON_LIBRARY_
FILE
"python27.lib")
ENDIF()
ElSE()
ENDIF()
ElSE()
- SET(PYTHON_LIBRARY_
DLL "libpython2
7.so")
+ 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})