1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
29 MACRO(BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT BBTK_PACKAGE_NAME BBTK_PACKAGE_BBS_BOXES BBTK_PACKAGE_BBS_APPLI BBTK_PACKAGE_BBG_BOXES BBTK_PACKAGE_BBG_APPLI )
32 ## --Configure and installing bbg boxes--
33 FOREACH(bbg ${BBTK_PACKAGE_BBG_BOXES})
35 ${CMAKE_CURRENT_SOURCE_DIR}/${bbg}
36 ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbg}
39 GET_FILENAME_COMPONENT(bbg_path ${bbg} PATH)
42 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbg}
43 DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbg_path}
47 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbg}
48 DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbg_path}
54 ## --Configure and installing bbg appli--
55 FOREACH(bbg ${BBTK_PACKAGE_BBG_APPLI})
57 ${CMAKE_CURRENT_SOURCE_DIR}/${bbg}
58 ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbg}
61 GET_FILENAME_COMPONENT(bbg_path ${bbg} PATH)
64 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbg}
65 DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbg_path}
69 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbg}
70 DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbg_path}
82 ## --Configure and installing bbs boxes--
89 ## "#-----------------------------------------\n"
90 ## "# Include script for bbtk package '${BBTK_PACKAGE_NAME}'\n"
91 ## "# Automatically generated by cmake (macro BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT)\n")
94 ## "#-----------------------------------------\n"
95 ## "load ${BBTK_PACKAGE_NAME}\n"
96 ## "#-----------------------------------------\n"
97 ## "package ${BBTK_PACKAGE_NAME}\n"
101 ## # "${OUTPUT_FILE}"
102 ## # "#-----------------------------------------\n"
103 ## # "include ${BBTK_PACKAGE_NAME}/boxes/*\n"
107 FOREACH(bbs ${BBTK_PACKAGE_BBS_BOXES})
112 ## "#-----------------------------------------\n"
113 ## "include ${BBTK_PACKAGE_NAME}/${bbs}\n"
117 ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
118 ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
121 GET_FILENAME_COMPONENT(bbs_path ${bbs} PATH)
126 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
127 # DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
128 DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
132 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
133 DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
134 # DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
143 ## ## --Configure and installing bbs appli--
146 ## "#-----------------------------------------\n"
148 ## "#-- EOF ----------------------------------\n"
155 # Creates the file ${BBTK_PACKAGE_NAME}-appli.bbp
156 SET(OUTPUT_FILE ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}-appli.bbp)
159 "#-----------------------------------------\n"
160 "# Applications include script for bbtk package '${BBTK_PACKAGE_NAME}'\n"
161 "# Automatically generated by cmake (macro BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT)\n")
164 "#-----------------------------------------\n"
165 "load ${BBTK_PACKAGE_NAME}\n"
166 "#-----------------------------------------\n"
167 "package ${BBTK_PACKAGE_NAME}\n"
170 FOREACH(bbs ${BBTK_PACKAGE_BBS_APPLI})
172 GET_FILENAME_COMPONENT(filename "${bbs}" NAME_WE)
175 "#-----------------------------------------\n"
176 "define ${filename}\n"
177 "include ${BBTK_PACKAGE_NAME}/${bbs} source\n"
182 ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
183 ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
186 GET_FILENAME_COMPONENT(bbs_path ${bbs} PATH)
191 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
192 # DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
193 DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
197 FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
198 DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
199 # DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
205 "#-----------------------------------------\n"
207 "#-- EOF ----------------------------------\n"
212 # DESTINATION ${BBTK_BBS_INSTALL_PATH}
213 DESTINATION ${BBTK_BBS_REL_PATH}
218 DESTINATION ${BBTK_BBS_INSTALL_PATH}
219 # DESTINATION ${BBTK_BBS_REL_PATH}
222 # ADD_CUSTOM_TARGET(${BBTK_PACKAGE_NAME}.bbp ALL
223 # DEPENDS ${OUTPUT_FILE}
227 ENDMACRO(BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT)