]> Creatis software - bbtk.git/blob - kernel/cmake/BBTKSetDeducedPaths.cmake
92210a7aaa6d9d560a55329560598dc4c1df7c98
[bbtk.git] / kernel / cmake / BBTKSetDeducedPaths.cmake
1  # ---------------------------------------------------------------------
2  #
3  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4  #                        pour la SantÈ)
5  # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6  # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7  # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8  #
9  #  This software is governed by the CeCILL-B license under French law and
10  #  abiding by the rules of distribution of free software. You can  use,
11  #  modify and/ or redistribute the software under the terms of the CeCILL-B
12  #  license as circulated by CEA, CNRS and INRIA at the following URL
13  #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14  #  or in the file LICENSE.txt.
15  #
16  #  As a counterpart to the access to the source code and  rights to copy,
17  #  modify and redistribute granted by the license, users are provided only
18  #  with a limited warranty  and the software's author,  the holder of the
19  #  economic rights,  and the successive licensors  have only  limited
20  #  liability.
21  #
22  #  The fact that you are presently reading this means that you have had
23  #  knowledge of the CeCILL-B license and that you accept its terms.
24  # ------------------------------------------------------------------------ */
25
26
27 MESSAGE(STATUS "===============================================")
28 MESSAGE(STATUS "Setting up deduced pathes:")
29 # Black box docs relative path
30 SET(BBTK_BBDOC_REL_PATH ${BBTK_DOC_REL_PATH}/bbdoc)
31 # Doxygen docs relative path
32 SET(BBTK_DOXYGEN_REL_PATH ${BBTK_DOC_REL_PATH}/doxygen)
33
34 MESSAGE(STATUS "* BBTK_BBDOC_REL_PATH   =${BBTK_BBDOC_REL_PATH}")
35 MESSAGE(STATUS "* BBTK_DOXYGEN_REL_PATH =${BBTK_DOXYGEN_REL_PATH}")
36
37 # Now compute BUILD TREE **ABSOLUTE PATHS**
38 SET(BBTK_DOC_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_DOC_REL_PATH})
39 SET(BBTK_BBDOC_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_BBDOC_REL_PATH})
40 SET(BBTK_DOXYGEN_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_DOXYGEN_REL_PATH})
41 SET(BBTK_BBS_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_BBS_REL_PATH})
42 SET(BBTK_DATA_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_DATA_REL_PATH})
43
44 #SET(BBTK_DOC_INSTALL_PATH ${BBTK_INSTALL_PREFIX}/${BBTK_DOC_REL_PATH})
45 #SET(BBTK_BBDOC_INSTALL_PATH ${BBTK_INSTALL_PREFIX}/${BBTK_BBDOC_REL_PATH})
46 #SET(BBTK_DOXYGEN_INSTALL_PATH ${BBTK_INSTALL_PREFIX}/${BBTK_DOXYGEN_REL_PATH})
47 #SET(BBTK_BBS_INSTALL_PATH ${BBTK_INSTALL_PREFIX}/${BBTK_BBS_REL_PATH})
48 #SET(BBTK_DATA_INSTALL_PATH ${BBTK_INSTALL_PREFIX}/${BBTK_DATA_REL_PATH})
49
50 # LG 22/10/08 : REMOVED THE **ABSOLUTE INSTALL PATH**
51 # was buggy when packaging
52 # consequences : 
53 #  1) generated packages are NOT relocatables 
54 #  2) they must be installed at the same prefix than bbtk
55 SET(BBTK_DOC_INSTALL_PATH     ${BBTK_DOC_REL_PATH})
56 SET(BBTK_BBDOC_INSTALL_PATH   ${BBTK_BBDOC_REL_PATH})
57 SET(BBTK_DOXYGEN_INSTALL_PATH ${BBTK_DOXYGEN_REL_PATH})
58 SET(BBTK_BBS_INSTALL_PATH     ${BBTK_BBS_REL_PATH})
59 SET(BBTK_DATA_INSTALL_PATH    ${BBTK_DATA_REL_PATH})
60
61
62
63
64 # Create build directories if necessary
65 CREA_MKDIR(${BBTK_DOC_BUILD_PATH})
66 CREA_MKDIR(${BBTK_BBDOC_BUILD_PATH})
67 CREA_MKDIR(${BBTK_DOXYGEN_BUILD_PATH})
68 CREA_MKDIR(${BBTK_BBS_BUILD_PATH})
69 CREA_MKDIR(${BBTK_DATA_BUILD_PATH})
70
71 #-----------------------------------------------------------------------------
72 SET (EXECUTABLE_OUTPUT_PATH 
73   ${PROJECT_BINARY_DIR}/${EXECUTABLE_OUTPUT_REL_PATH})
74 SET (LIBRARY_OUTPUT_PATH    
75   ${PROJECT_BINARY_DIR}/${LIBRARY_OUTPUT_REL_PATH})
76 #-----------------------------------------------------------------------------
77 MESSAGE(STATUS "* EXECUTABLE_OUTPUT_PATH=${EXECUTABLE_OUTPUT_PATH}")
78 MESSAGE(STATUS "* LIBRARY_OUTPUT_PATH   =${LIBRARY_OUTPUT_PATH}")
79
80 #-----------------------------------------------------------------------------
81 # Today CMakeCreateFindPackage is copied in BBTK_CMAKE_DIR
82 # When installed as a separate project will have to find it with FIND_PACKAGE
83 SET(CMakeCreateFindPackage_DIR ${BBTK_CMAKE_DIR})
84 #-----------------------------------------------------------------------------
85
86
87 #-----------------------------------------------------------------------------
88 # Dependencies added only the first time !
89 IF(BBTK_CORE_PACKAGE)
90
91   IF(EXISTS "${BBTK_BBI}")
92     SET(BBTK_BBI_DEPENDENCY)
93   ELSE(EXISTS "${BBTK_BBI}")
94     SET(BBTK_BBI_DEPENDENCY ${BBTK_BBI})
95   ENDIF(EXISTS "${BBTK_BBI}")
96   
97   IF(EXISTS "${BBTK_BBS2CPP}")
98     SET(BBTK_BBS2CPP_DEPENDENCY)
99   ELSE(EXISTS "${BBTK_BBS2CPP}")
100     SET(BBTK_BBS2CPP_DEPENDENCY ${BBTK_BBS2CPP})
101   ENDIF(EXISTS "${BBTK_BBS2CPP}")
102   
103   IF(EXISTS "${BBTK_BBFY}")
104     SET(BBTK_BBFY_DEPENDENCY)
105   ELSE(EXISTS "${BBTK_BBFY}")
106     SET(BBTK_BBFY_DEPENDENCY ${BBTK_BBFY})
107   ENDIF(EXISTS "${BBTK_BBFY}")
108
109 ENDIF(BBTK_CORE_PACKAGE)
110 #-----------------------------------------------------------------------------
111
112
113 MESSAGE(STATUS "===============================================")
114
115