Salome HOME
updated copyright message
[modules/gui.git] / tools / CurvePlot / SalomeCURVEPLOTConfig.cmake.in
1 # Copyright (C) 2013-2023  CEA, EDF
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 # - Config file for the @PROJECT_NAME@ package
21 # It defines the following variables. 
22 # Specific to the pacakge @PROJECT_NAME@ itself:
23 #  @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
24 #
25
26 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
27 @PACKAGE_INIT@
28
29 # Options exported by the package:
30 SET(SALOME_CURVEPLOT_BUILD_DOC    @SALOME_BUILD_DOC@)
31 SET(SALOME_CURVEPLOT_BUILD_TESTS  @SALOME_BUILD_TESTS@)
32 SET(SALOME_CURVEPLOT_STANDALONE   @SALOME_CURVEPLOT_STANDALONE@)
33
34 # Load the dependencies for the libraries of @PROJECT_NAME@ 
35 # (contains definitions for IMPORTED targets). This is only 
36 # imported if we are not built as a subproject (in this case targets are already there)
37 IF(NOT TARGET CurvePlot AND NOT @PROJECT_NAME@_BINARY_DIR AND NOT SALOME_CURVEPLOT_STANDALONE)
38   INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake")
39 ENDIF()   
40
41 # Package root dir:
42 SET_AND_CHECK(CURVEPLOT_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
43
44 # Include directories
45 SET_AND_CHECK(CURVEPLOT_INCLUDE_DIRS "${CURVEPLOT_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
46
47 #### Now the specificities
48
49
50 # Level 1 prerequisites:
51 IF(SALOME_CURVEPLOT_STANDALONE)
52   SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
53   SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
54 ENDIF()
55
56 SET_AND_CHECK(QT5_ROOT_DIR_EXP "@PACKAGE_QT5_ROOT_DIR@")
57 SET_AND_CHECK(PYQT5_ROOT_DIR_EXP "@PACKAGE_PYQT5_ROOT_DIR@")
58 SET_AND_CHECK(PYTHON_ROOT_DIR_EXP "@PACKAGE_PYTHON_ROOT_DIR@")
59
60
61 # For all prerequisites, load the corresponding targets if the package was used 
62 # in CONFIG mode. This ensures dependent projects link correctly
63 # without having to set LD_LIBRARY_PATH:
64 SET(_PREREQ @_PREREQ_LIST@)
65 SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
66 SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
67 LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
68 IF(NOT _list_len EQUAL 0)
69   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
70   MATH(EXPR _range "${_list_len}-1")
71   FOREACH(_p RANGE ${_range})  
72     LIST(GET _PREREQ            ${_p} _pkg    )
73     LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
74     LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
75     MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
76     IF(NOT _pkg_compo)
77       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
78           PATHS "${_pkg_dir}" 
79           NO_DEFAULT_PATH)
80     ELSE()
81       STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
82       MESSAGE(STATUS "===> (components: ${_pkg_compo})")
83       FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
84           COMPONENTS ${_compo_lst} 
85           PATHS "${_pkg_dir}"
86           NO_DEFAULT_PATH)
87     ENDIF()
88   ENDFOREACH()
89 ENDIF()
90
91 # Installation directories
92 SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
93 SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
94 SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
95 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
96 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
97 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
98
99 # Exposed CURVEPLOT targets:
100 SET(CURVEPLOT_CurvePlot CurvePlot)