X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=CMakeModules%2FFindLibbatchPython.cmake;h=6c3ecdaea841631b5738bb449ecca6d1059aa8e8;hb=7427c48d81c05cff43b6eb0e2313b4cc06e24e28;hp=e62d008aa3f821eb2fe4faf09d75c7ad224006fe;hpb=bee2cbd48175ca7c8b3dc0291c27693936472f80;p=tools%2Flibbatch.git diff --git a/CMakeModules/FindLibbatchPython.cmake b/CMakeModules/FindLibbatchPython.cmake index e62d008..6c3ecda 100644 --- a/CMakeModules/FindLibbatchPython.cmake +++ b/CMakeModules/FindLibbatchPython.cmake @@ -1,9 +1,9 @@ -# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -37,6 +37,12 @@ ENDIF() SET(PYTHON_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to Python directory (interpreter and libs)") # 2. Find package - config mode first (i.e. looking for XYZ-config.cmake) +IF(WIN32) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(PythonInterp_FIND_VERSION _d) + SET(PYTHON_DEFINITIONS "-DHAVE_DEBUG_PYTHON") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) +ENDIF(WIN32) IF(EXISTS "${PYTHON_ROOT_DIR}") # Hope to find direclty a CMake config file there SET(_CONF_DIR "${PYTHON_ROOT_DIR}/share/cmake") @@ -78,8 +84,6 @@ IF (PYTHONINTERP_FOUND) # Prepare call to FIND_PACKAGE(PythonLibs) and ensure priority is given to # the location found for the interpreter: GET_FILENAME_COMPONENT(_tmp "${_python_dir}" PATH) -# SET(PYTHON_LIBRARY ${_tmp}/lib) -# SET(PYTHON_INCLUDE_DIR ${_tmp}/include) SALOME_FIND_PACKAGE(LibbatchPython PythonLibs MODULE) # Restore variables: SET(LibbatchPython_FIND_VERSION_EXACT ${_old_EXACT})