]> SALOME platform Git repositories - modules/paravis.git/blob - SalomePARAVISConfig.cmake.in
Salome HOME
Prefix test names with component name + update test base according to 4219a9 and...
[modules/paravis.git] / SalomePARAVISConfig.cmake.in
1 # - Config file for the @PROJECT_NAME@ package
2 # It defines the following variables. 
3 # Specific to the pacakge @PROJECT_NAME@ itself:
4 #  @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
5 #
6
7 ###############################################################
8 # Copyright (C) 2007-2015  CEA/DEN, EDF R&D
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License as published by the Free Software Foundation; either
13 # version 2.1 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Lesser General Public License for more details.
19 #
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23 #
24 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
25 #
26
27 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
28 @PACKAGE_INIT@
29
30 # Load the dependencies for the libraries of @PROJECT_NAME@ 
31 # (contains definitions for IMPORTED targets). This is only 
32 # imported if we are not built as a subproject (in this case targets are already there)
33 IF(NOT TARGET PARAVIS AND NOT @PROJECT_NAME@_BINARY_DIR)
34   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
35 ENDIF()   
36
37 # Package root dir:
38 SET_AND_CHECK(PARAVIS_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
39
40 # Include directories
41 SET_AND_CHECK(PARAVIS_INCLUDE_DIRS "${PARAVIS_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
42 SET(PARAVIS_INCLUDE_DIRS "${PARAVIS_INCLUDE_DIRS};@_SalomePARAVIS_EXTRA_HEADERS@")
43 SET(PARAVIS_DEFINITIONS "@GUI_DEFINITIONS@")
44
45 # Package specific environment variables
46 @_SalomePARAVIS_EXTRA_ENV_FULL@
47
48 #### Now the specificities
49
50 # Options exported by the package:
51 SET(SALOME_PARAVIS_BUILD_DOC   @SALOME_BUILD_DOC@)
52 SET(SALOME_PARAVIS_BUILD_TESTS @SALOME_BUILD_TESTS@)
53 SET(SALOME_PARAVIS_LIGHT_ONLY  @SALOME_LIGHT_ONLY@)
54 SET(SALOME_PARAVIS_USE_GEOM_SOURCE  @SALOME_PARAVIS_USE_GEOM_SOURCE@)
55 SET(SALOME_PARAVIS_USE_SMESH_SOURCE  @SALOME_PARAVIS_USE_SMESH_SOURCE@)
56
57
58 # Level 1 prerequisites:
59 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
60 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
61 IF(SALOME_PARAVIS_BUILD_PLUGINS)
62   SET_AND_CHECK(MED_ROOT_DIR_EXP "@PACKAGE_MED_ROOT_DIR@")
63   LIST(APPEND PARAVIS_DEFINITIONS "@MED_DEFINITIONS@")
64 ENDIF()
65
66 IF(SALOME_PARAVIS_USE_GEOM_SOURCE)
67   SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@")
68   LIST(APPEND PARAVIS_DEFINITIONS "@GEOM_DEFINITIONS@")
69 ENDIF()
70
71 IF(SALOME_PARAVIS_USE_SMESH_SOURCE)
72   SET_AND_CHECK(SMESH_ROOT_DIR_EXP "@PACKAGE_SMESH_ROOT_DIR@")
73   LIST(APPEND PARAVIS_DEFINITIONS "@SMESH_DEFINITIONS@")
74 ENDIF()
75
76 SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
77
78 # Optional level 1 prerequisites:
79
80 # For all prerequisites, load the corresponding targets if the package was used
81 # in CONFIG mode. This ensures dependent projects link correctly
82 # without having to set LD_LIBRARY_PATH:
83 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
84 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
85 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
86 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
87 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
88   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
89   MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
90   FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
91     LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
92     LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
93     LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
94     IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
95       MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
96       IF(NOT _pkg_compo_@PROJECT_NAME@)
97         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
98             PATHS "${_pkg_dir_@PROJECT_NAME@}"
99             NO_DEFAULT_PATH)
100       ELSE()
101         STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
102         MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
103         FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
104             COMPONENTS ${_compo_lst_@PROJECT_NAME@}
105             PATHS "${_pkg_dir_@PROJECT_NAME@}"
106             NO_DEFAULT_PATH)
107       ENDIF()
108     ENDIF()
109   ENDFOREACH()
110 ENDIF()
111
112 # Installation directories
113 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
114 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
115 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
116 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
117 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
118 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
119 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
120 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
121 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
122 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
123 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
124 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
125 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
126 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
127 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
128 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
129
130 # Include GUI targets if they were not already loaded:
131 IF(NOT (TARGET Event)) 
132   INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
133 ENDIF()
134 IF(SALOME_PARAVIS_BUILD_PLUGINS)
135   # Include MED targets if they were not already loaded:
136   IF(NOT (TARGET SalomeIDLMED)) 
137     INCLUDE("${MED_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeMEDTargets.cmake")
138   ENDIF()
139 ENDIF()
140 IF(SALOME_PARAVIS_USE_GEOM_SOURCE)
141  # Include GEOM targets if they were not already loaded:
142   IF(NOT TARGET SalomeIDLGEOM)
143     INCLUDE("${GEOM_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGEOMTargets.cmake")
144   ENDIF()
145 ENDIF()
146 IF(SALOME_PARAVIS_USE_SMESH_SOURCE)
147  # Include GEOM targets if they were not already loaded:
148   IF(NOT TARGET SalomeIDLSMESH)
149     INCLUDE("${SMESH_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeSMESHTargets.cmake")
150   ENDIF()
151 ENDIF()
152
153 # Exposed PARAVIS targets:
154 SET(PARAVIS_SalomeIDLPARAVIS SalomeIDLPARAVIS)
155 SET(PARAVIS_PARAVIS PARAVIS)
156 SET(PARAVIS_PARAVISEngine PARAVISEngine)
157 SET(PARAVIS_PVViewer PVViewer)
158