1 # Copyright (C) 2010-2021 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
21 INCLUDE(CMakeDependentOption)
22 PROJECT(PARAVISADDONS C CXX)
25 STRING( REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} )
26 SET( CMAKE_SHARED_LINKER_FLAGS_DEBUG "${replacementFlags}" )
31 # Project name, upper case
32 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
34 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
35 SET(${PROJECT_NAME_UC}_MINOR_VERSION 6)
36 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
37 SET(${PROJECT_NAME_UC}_VERSION
38 ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
39 SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
43 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
44 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
45 LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
46 INCLUDE(SalomeMacros NO_POLICY_SCOPE)
48 MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
53 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
54 IF(EXISTS ${KERNEL_ROOT_DIR})
55 FIND_PACKAGE(SalomeKERNEL REQUIRED)
56 ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
57 INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
58 ELSE(EXISTS ${KERNEL_ROOT_DIR})
59 MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
60 ENDIF(EXISTS ${KERNEL_ROOT_DIR})
64 INCLUDE(SalomeSetupPlatform) # From KERNEL
65 # Always build libraries as shared objects:
66 SET(BUILD_SHARED_LIBS TRUE)
68 FIND_PACKAGE(SalomeQt5 REQUIRED)
71 ## Specific to ParaViS:
74 FIND_PACKAGE(SalomeParaView REQUIRED)
76 # Header configuration
77 # ====================
78 SALOME_XVERSION(${PROJECT_NAME})
79 SALOME_CONFIGURE_FILE(PARAVISADDONS_version.h.in PARAVISADDONS_version.h INSTALL ${SALOME_INSTALL_HEADERS})
80 OPTION(PARAVISADDONS_COMMON_BUILD_TESTS "Build PARAVISADDONS_COMMON tests." ON)