CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
PROJECT(SalomeHYDROSOLVER C CXX)
-# Ensure a proper linker behavior:
-CMAKE_POLICY(SET CMP0003 NEW)
-
# Versioning
# ===========
# Project name, upper case
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 2)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
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})
SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
-# Find KERNEL
-# ===========
+# Common CMake macros
+# ===================
SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
IF(EXISTS ${CONFIGURATION_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
- INCLUDE(SalomeMacros)
+ INCLUDE(SalomeMacros NO_POLICY_SCOPE)
ELSE()
MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
ENDIF()
+# Find KERNEL
+# ==============
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
-IF(EXISTS ${KERNEL_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
- #INCLUDE(SalomeMacros)
+IF( EXISTS ${KERNEL_ROOT_DIR} )
FIND_PACKAGE(SalomeKERNEL REQUIRED)
-ELSE(EXISTS ${KERNEL_ROOT_DIR})
- MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
-ENDIF(EXISTS ${KERNEL_ROOT_DIR})
+ KERNEL_WITH_CORBA() #check whether KERNEL built with CORBA
+ ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
+ INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
+ELSE( EXISTS ${KERNEL_ROOT_DIR} )
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR or turn option SALOME_HYDRO_USE_KERNEL to OFF !")
+ENDIF( EXISTS ${KERNEL_ROOT_DIR} )
# Platform setup
# ==============
##
FIND_PACKAGE(SalomePythonInterp REQUIRED)
FIND_PACKAGE(SalomePythonLibs REQUIRED)
-#FIND_PACKAGE(SalomePython REQUIRED)
FIND_PACKAGE(SalomeOmniORB REQUIRED)
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
FIND_PACKAGE(SalomeSWIG REQUIRED)
# Find GUI
# ===========
+SET(GDAL_ROOT_DIR $ENV{GDALHOME}) # When looking for Salome GUI, reloading targets from Paraview
+IF(EXISTS ${GDAL_ROOT_DIR})
+ SET(GDAL_LIBRARY ${GDAL_ROOT_DIR}/lib)
+ SET(GDAL_INCLUDE_DIR ${GDAL_ROOT_DIR}/include)
+ENDIF(EXISTS ${GDAL_ROOT_DIR})
+
SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
IF(EXISTS ${GUI_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeTelemac REQUIRED)
+# Detection summary:
+SALOME_PACKAGE_REPORT_AND_CHECK()
+
# Directories
# (default values taken from KERNEL)
# ===========