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
7 ###############################################################
8 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D
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.
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.
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
24 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
28 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
31 # Load the dependencies for the libraries of @PROJECT_NAME@
32 # (contains definitions for IMPORTED targets). This is only
33 # imported if we are not built as a subproject (in this case targets are already there)
34 IF(NOT TARGET GEOMbasic AND NOT @PROJECT_NAME@_BINARY_DIR)
35 INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
39 SET_AND_CHECK(YACS_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
42 SET_AND_CHECK(YACS_INCLUDE_DIRS "${YACS_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
43 SET(YACS_INCLUDE_DIRS "${YACS_INCLUDE_DIRS};@_SalomeYACS_EXTRA_HEADERS@")
44 SET(YACS_DEFINITIONS "-DYACS_PTHREAD")
46 # Package specific environment variables
47 @_SalomeYACS_EXTRA_ENV_FULL@
49 #### Now the specificities
51 # Options exported by the package:
52 SET(SALOME_YACS_BUILD_DOC @SALOME_BUILD_DOC@)
53 SET(SALOME_YACS_BUILD_TESTS @SALOME_BUILD_TESTS@)
56 SET(SALOME_YACS_BUILD_GUI @SALOME_BUILD_GUI@)
57 SET(SALOME_YACS_USE_KERNEL @SALOME_YACS_USE_KERNEL@)
58 SET(SALOME_YACS_USE_DSC @SALOME_YACS_USE_DSC@)
59 SET(SALOME_YACS_USE_PYEDITOR @SALOME_YACS_USE_PYEDITOR@)
60 SET(SALOME_YACS_USE_SWIG @SALOME_YACS_USE_SWIG@)
62 # Optional level 1 prerequisites:
63 IF(SALOME_YACS_USE_KERNEL)
64 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
65 LIST(APPEND YACS_DEFINITIONS "@KERNEL_DEFINITIONS@")
67 SET_AND_CHECK(PYTHON_ROOT_DIR_EXP "@PACKAGE_PYTHON_ROOT_DIR@")
68 SET_AND_CHECK(BOOST_ROOT_DIR_EXP "@PACKAGE_BOOST_ROOT_DIR@")
69 SET_AND_CHECK(OMNIORB_ROOT_DIR_EXP "@PACKAGE_OMNIORB_ROOT_DIR@")
70 SET_AND_CHECK(LIBXML2_ROOT_DIR_EXP "@PACKAGE_LIBXML2_ROOT_DIR@")
71 SET_AND_CHECK(GRAPHVIZ_ROOT_DIR_EXP "@PACKAGE_GRAPHVIZ_ROOT_DIR@")
72 IF(SALOME_YACS_USE_SWIG)
73 SET_AND_CHECK(SWIG_ROOT_DIR_EXP "@PACKAGE_SWIG_ROOT_DIR@")
75 IF(SALOME_YACS_BUILD_DOC)
76 SET_AND_CHECK(DOXYGEN_ROOT_DIR_EXP "@PACKAGE_DOXYGEN_ROOT_DIR@")
77 SET_AND_CHECK(SPHINX_ROOT_DIR_EXP "@PACKAGE_SPHINX_ROOT_DIR@")
80 IF(SALOME_YACS_BUILD_GUI)
81 SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
82 LIST(APPEND YACS_DEFINITIONS "@GUI_DEFINITIONS@")
85 # For all prerequisites, load the corresponding targets if the package was used
86 # in CONFIG mode. This ensures dependent projects link correctly
87 # without having to set LD_LIBRARY_PATH:
88 SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
89 SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
90 SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
91 LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
92 IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
93 # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
94 MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
95 FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
96 LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ )
97 LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
98 LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
99 IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
100 MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
101 IF(NOT _pkg_compo_@PROJECT_NAME@)
102 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
103 PATHS "${_pkg_dir_@PROJECT_NAME@}"
106 STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
107 MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
108 FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
109 COMPONENTS ${_compo_lst_@PROJECT_NAME@}
110 PATHS "${_pkg_dir_@PROJECT_NAME@}"
117 # Installation directories
118 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
119 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
120 SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
121 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
122 SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
123 SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
124 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
125 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
126 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
127 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
128 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
129 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
130 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
131 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
133 IF(SALOME_YACS_BUILD_GUI)
134 # Include GUI targets if they were not already loaded:
135 IF(NOT (TARGET Event))
136 INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
138 ELSE(SALOME_YACS_BUILD_GUI)
139 IF(SALOME_YACS_USE_KERNEL)
140 # Include KERNEL targets if they were not already loaded:
141 IF(NOT (TARGET SALOMEBasics))
142 INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
144 ENDIF(SALOME_YACS_USE_KERNEL)
145 ENDIF(SALOME_YACS_BUILD_GUI)
147 # Exposed YACS targets:
148 SET(YACS_YACSloader YACSloader)
149 SET(YACS_YACSBases YACSBases)
150 SET(YACS_YACSlibEngine YACSlibEngine)
151 SET(YACS_YACSRuntimeSALOME YACSRuntimeSALOME)
152 SET(YACS_YACSDLTest YACSDLTest)
153 SET(YACS_SalomeIDLYACS SalomeIDLYACS)
155 #SET(YACS_TestComponentLocal TestComponentLocal)
156 #SET(YACS_PluginSimplex PluginSimplex)
157 #SET(YACS_PluginOptEvTest1 PluginOptEvTest1)
159 SET(YACS_GenericGui GenericGui)
161 SET(YACS_SalomeWrap SalomeWrap)
162 SET(YACS_yacsloader_echo yacsloader_echo)