]> SALOME platform Git repositories - modules/hydro.git/blob - SalomeHYDROConfig.cmake.in
Salome HOME
Merge branch 'BR_LAND_COVER_MAP' of ssh://git.salome-platform.org/modules/hydro into...
[modules/hydro.git] / SalomeHYDROConfig.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-2013  CEA/DEN, EDF R&D, OPEN CASCADE
9 #
10 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
11 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
12 #
13 #  This library is free software; you can redistribute it and/or
14 #  modify it under the terms of the GNU Lesser General Public
15 #  License as published by the Free Software Foundation; either
16 #  version 2.1 of the License.
17 #
18 #  This library is distributed in the hope that it will be useful,
19 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
20 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 #  Lesser General Public License for more details.
22 #
23 #  You should have received a copy of the GNU Lesser General Public
24 #  License along with this library; if not, write to the Free Software
25 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
26 #
27 #  See http://www.salome-platform.org/ or
28 #  email : webmaster.salome@opencascade.com
29 ###############################################################
30 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
31 @PACKAGE_INIT@
32
33 # Load the dependencies for the libraries of @PROJECT_NAME@ 
34 # (contains definitions for IMPORTED targets). This is only 
35 # imported if we are not built as a subproject (in this case targets are already there)
36 IF(NOT @PROJECT_NAME@_BINARY_DIR)
37   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
38 ENDIF()
39
40 # Package root dir:
41 SET_AND_CHECK(HYDRO_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
42
43 # Include directories
44 SET_AND_CHECK(HYDRO_INCLUDE_DIRS "${HYDRO_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
45 SET(HYDRO_INCLUDE_DIRS "${HYDRO_INCLUDE_DIRS};@_SalomeHYDRO_EXTRA_HEADERS@")
46 SET(HYDRO_DEFINITIONS)
47
48 #### Now the specificities
49
50 # Options exported by the package:
51 SET(SALOME_HYDRO_BUILD_DOC      @SALOME_BUILD_DOC@)
52 SET(SALOME_HYDRO_BUILD_TESTS    @SALOME_BUILD_TESTS@)
53
54 # Advanced options
55 SET(SALOME_HYDRO_BUILD_GUI      @SALOME_BUILD_GUI@)
56
57 # Level 1 prerequisites:
58 SET_AND_CHECK(EXPAT_ROOT_DIR_EXP "@PACKAGE_EXPAT_ROOT_DIR@")
59
60 # Optional level 1 prerequisites:
61 IF(SALOME_HYDRO_BUILD_GUI)
62   SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
63   LIST(APPEND HYDRO_DEFINITIONS "@GUI_DEFINITIONS@")
64 ENDIF()
65
66 # For all prerequisites, load the corresponding targets if the package was used 
67 # in CONFIG mode. This ensures dependent projects link correctly
68 # without having to set LD_LIBRARY_PATH:
69 SET(_PREREQ Expat QScintilla Qt4)
70 SET(_PREREQ_CONFIG_DIR "@Expat_DIR@" "@QScintilla_DIR@" "@Qt4_DIR@")
71 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
72 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
73 MATH(EXPR _range "${_list_len}-1")
74 FOREACH(_p RANGE ${_range})
75   LIST(GET _PREREQ            ${_p} _pkg    )
76   LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
77   IF(_pkg_dir)
78      MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
79      FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
80           PATHS "${_pkg_dir}" 
81           NO_DEFAULT_PATH)
82   ENDIF()
83 ENDFOREACH()
84
85 # Installation directories
86 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
87 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
88 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
89 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
90 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
91 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
92 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
93 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
94 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
95 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
96 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
97 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
98 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
99 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
100
101 IF(SALOME_HYDRO_BUILD_GUI)
102   # Include GUI targets if they were not already loaded:
103   IF(NOT (TARGET Event)) 
104     INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
105   ENDIF()
106 ELSE(SALOME_HYDRO_BUILD_GUI) 
107   IF(SALOME_HYDRO_USE_KERNEL) 
108     # Include KERNEL targets if they were not already loaded:
109     IF(NOT (TARGET SALOMEBasics)) 
110       INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
111     ENDIF()
112   ENDIF(SALOME_HYDRO_USE_KERNEL)
113 ENDIF(SALOME_HYDRO_BUILD_GUI)
114
115 # Exposed HYDRO targets:
116 SET(HYDRO_HYDROloader HYDROloader)
117 SET(HYDRO_HYDROBases HYDROBases)
118 SET(HYDRO_HYDROlibEngine HYDROlibEngine)
119 SET(HYDRO_HYDRORuntimeSALOME HYDRORuntimeSALOME)
120 SET(HYDRO_HYDRODLTest HYDRODLTest)
121 SET(HYDRO_SalomeIDLHYDRO SalomeIDLHYDRO)
122 #TODO:
123 #SET(HYDRO_TestComponentLocal TestComponentLocal)
124 #SET(HYDRO_PluginSimplex PluginSimplex)
125 #SET(HYDRO_PluginOptEvTest1 PluginOptEvTest1)
126 SET(HYDRO_HMI HMI)
127 SET(HYDRO_GenericGui GenericGui)
128 SET(HYDRO_HYDRO HYDRO)
129 SET(HYDRO_SalomeWrap SalomeWrap)