# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
#INCLUDE(CMakeDependentOption)
PROJECT(MEDCoupling C CXX)
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-# Our own set of macros:
-LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_files")
-INCLUDE(SalomeMacros)
+# Common CMake macros
+SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake files")
+IF(EXISTS ${CONFIGURATION_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+ INCLUDE(SalomeMacros)
+ELSE()
+ MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
+ENDIF()
# Platform setup
# ==============
SALOME_LOG_OPTIONAL_PACKAGE(PythonInterp MEDCOUPLING_ENABLE_PYTHON)
SALOME_LOG_OPTIONAL_PACKAGE(PythonLibs MEDCOUPLING_ENABLE_PYTHON)
SALOME_LOG_OPTIONAL_PACKAGE(SWIG MEDCOUPLING_ENABLE_PYTHON)
+ IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "2")
+ IF("${PYTHON_VERSION_MINOR}" LESS "7")
+ MESSAGE(FATAL_ERROR "MEDCoupling's Python requires at least Python 2.7 (you seem to have ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}). Upgrade your Python, or turn off MEDCOUPLING_ENABLE_PYTHON")
+ ENDIF()
+ ENDIF()
+ IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
+ MESSAGE(STATUS "Using Python 3")
+ ENDIF()
ENDIF(MEDCOUPLING_ENABLE_PYTHON)
IF(MEDCOUPLING_BUILD_DOC)
ENDIF(WIN32)
ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(cmake_files)
+ADD_SUBDIRECTORY(adm_local)
IF(MEDCOUPLING_BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF(MEDCOUPLING_BUILD_DOC)
ADD_SUBDIRECTORY(resources)
-ADD_SUBDIRECTORY(v8_work)
+IF(MEDCOUPLING_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(v8_work)
+ENDIF()
# Configuration export
# ====================