Salome HOME
Fix ZJFilter to deal with int64 family array
[tools/paravisaddons_common.git] / CMakeLists.txt
1 # Copyright (C) 2010-2021  CEA/DEN, EDF R&D
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
21 INCLUDE(CMakeDependentOption)
22
23 # Project name
24 # ============
25 # original
26 PROJECT(PARAVISADDONS C CXX)
27 # upper case
28 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
29
30 IF(WIN32)
31   STRING( REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} )
32   SET( CMAKE_SHARED_LINKER_FLAGS_DEBUG "${replacementFlags}" )
33 ENDIF(WIN32)
34
35 # Common CMake macros
36 # ===================
37 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
38 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
39   LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
40   INCLUDE(SalomeMacros NO_POLICY_SCOPE)
41 ELSE()
42   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
43 ENDIF()
44
45 # Versioning
46 # ===========
47 SALOME_SETUP_VERSION(9.8.0)
48 MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
49
50 # Find KERNEL
51 # ===========
52 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
53 IF(EXISTS ${KERNEL_ROOT_DIR})
54   FIND_PACKAGE(SalomeKERNEL REQUIRED)
55   ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
56   INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
57 ELSE(EXISTS ${KERNEL_ROOT_DIR})
58   MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
59 ENDIF(EXISTS ${KERNEL_ROOT_DIR})
60
61 # Platform setup
62 # ==============
63 INCLUDE(SalomeSetupPlatform)   # From KERNEL
64 # Always build libraries as shared objects:
65 SET(BUILD_SHARED_LIBS TRUE)
66
67 FIND_PACKAGE(SalomeQt5 REQUIRED)
68
69 ##
70 ## Specific to ParaViS:
71 ##
72
73 FIND_PACKAGE(SalomeParaView REQUIRED)
74
75 # Header configuration
76 # ====================
77 SALOME_CONFIGURE_FILE(PARAVISADDONS_version.h.in PARAVISADDONS_version.h INSTALL ${SALOME_INSTALL_HEADERS})
78 OPTION(PARAVISADDONS_COMMON_BUILD_TESTS "Build PARAVISADDONS_COMMON tests." ON)
79
80 # Sources
81 # ========
82 ADD_SUBDIRECTORY(src)