Salome HOME
Copyrights update 2015.
[plugins/acisplugin.git] / SalomeACISPLUGINConfig.cmake.in
1 # Config file for the @PROJECT_NAME@ package
2 # It defines the following variables:
3 #   @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
4 #
5
6 ###############################################################
7 # Copyright (C) 2014-2015  OPEN CASCADE
8 #
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2.1 of the License, or (at your option) any later version.
13 #
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
18 #
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22 #
23 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #
25
26 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
27 @PACKAGE_INIT@
28
29 # Load the dependencies for the libraries of @PROJECT_NAME@ 
30 # (contains definitions for IMPORTED targets). This is only 
31 # imported if we are not built as a subproject (in this case targets are already there)
32 IF(NOT TARGET ACISExport AND NOT @PROJECT_NAME@_BINARY_DIR)
33   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
34 ENDIF()   
35
36 # Package root dir:
37 SET_AND_CHECK(ACISPLUGIN_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
38
39 # Include directories
40 SET_AND_CHECK(ACISPLUGIN_INCLUDE_DIRS "${ACISPLUGIN_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
41 SET(ACISPLUGIN_INCLUDE_DIRS "${ACISPLUGIN_INCLUDE_DIRS};@_SalomeACISPLUGIN_EXTRA_HEADERS@")
42 SET(ACISPLUGIN_DEFINITIONS)
43
44 # Package specific environment variables
45 @_SalomeACISPLUGIN_EXTRA_ENV_FULL@
46
47 #### Now the specificities
48
49 # Options exported by the package:
50 #SET(SALOME_ACISPLUGIN_BUILD_DOC   @SALOME_BUILD_DOC@)
51 SET(SALOME_ACISPLUGIN_BUILD_TESTS @SALOME_BUILD_TESTS@)
52
53 # Level 1 prerequisites:
54 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
55 SET_AND_CHECK(ACIS_ROOT_DIR_EXP "@PACKAGE_ACIS_ROOT_DIR@")
56 SET_AND_CHECK(OCCLICENSE_ROOT_DIR_EXP "@PACKAGE_OCCLICENSE_ROOT_DIR@")
57
58 # For all prerequisites, load the corresponding targets if the package was used 
59 # in CONFIG mode. This ensures dependent projects link correctly
60 # without having to set LD_LIBRARY_PATH:
61 SET(_PREREQ @_PREREQ_LIST@)
62 SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
63 SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
64 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
65 IF(NOT _list_len EQUAL 0)
66   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
67   MATH(EXPR _range "${_list_len}-1")
68   FOREACH(_p RANGE ${_range})  
69     LIST(GET _PREREQ            ${_p} _pkg    )
70     LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
71     LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
72     MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
73     IF(NOT _pkg_compo)
74       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
75           PATHS "${_pkg_dir}" 
76           NO_DEFAULT_PATH)
77     ELSE()
78       STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
79       MESSAGE(STATUS "===> (components: ${_pkg_compo})")
80       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
81           COMPONENTS ${_compo_lst} 
82           PATHS "${_pkg_dir}"
83           NO_DEFAULT_PATH)
84     ENDIF()
85   ENDFOREACH()
86 ENDIF()
87
88 # Installation directories
89 SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
90 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
91 SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
92 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
93 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
94 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
95
96 # Exposed ACISPLUGIN targets:
97 SET(ACISPLUGIN_ACISExport ACISExport)
98 SET(ACISPLUGIN_ACISImport ACISImport)