-# 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
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(WINDOWS)
+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(WINDOWS)
+ENDIF(WIN32)
IF(EXISTS "${PYTHON_ROOT_DIR}")
# Hope to find direclty a CMake config file there
SET(_CONF_DIR "${PYTHON_ROOT_DIR}/share/cmake")
MARK_AS_ADVANCED(Python_DIR)
IF (NOT PYTHON_FOUND)
- SET(CMAKE_PREFIX_PATH "${PYTHON_ROOT_DIR}")
+ LIST(APPEND CMAKE_PREFIX_PATH "${PYTHON_ROOT_DIR}")
ELSE()
MESSAGE(STATUS "Found Python in CONFIG mode!")
ENDIF()