# Copyright (C) 2010-2021 CEA/DEN, EDF R&D # # 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, 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 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) INCLUDE(CMakeDependentOption) PROJECT(PARAVISADDONS C CXX) IF(WIN32) STRING( REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ) SET( CMAKE_SHARED_LINKER_FLAGS_DEBUG "${replacementFlags}" ) ENDIF(WIN32) # Versioning # =========== # Project name, upper case STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9) SET(${PROJECT_NAME_UC}_MINOR_VERSION 6) 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 0) # 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 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}) FIND_PACKAGE(SalomeKERNEL REQUIRED) 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") ENDIF(EXISTS ${KERNEL_ROOT_DIR}) # Platform setup # ============== INCLUDE(SalomeSetupPlatform) # From KERNEL # Always build libraries as shared objects: SET(BUILD_SHARED_LIBS TRUE) FIND_PACKAGE(SalomeQt5 REQUIRED) ## ## Specific to ParaViS: ## FIND_PACKAGE(SalomeParaView REQUIRED) # Header configuration # ==================== SALOME_XVERSION(${PROJECT_NAME}) SALOME_CONFIGURE_FILE(PARAVISADDONS_version.h.in PARAVISADDONS_version.h INSTALL ${SALOME_INSTALL_HEADERS}) # Sources # ======== ADD_SUBDIRECTORY(src)