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 # ------------------------------------------------------------------------ */
26 # Installs bbCreateBlackBox.bat/.sh
27 # used to creates a new black box source file (xml or C++)
29 # Relative path to the data used by bbCreateBlackBox from data root folder
30 SET(bbCreateBlackBox_DATA_REL_PATH_FROM_DATA kernel/bbCreateBlackBox)
32 # Configure / Install the template xml files used by bbCreateBlackBox
33 # Copy it into build tree
35 FILE(GLOB_RECURSE LST_FILE_VOID_CREATE_PACKAGE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/xml-templates *.xml )
36 FOREACH( iLST ${LST_FILE_VOID_CREATE_PACKAGE})
37 STRING(SUBSTRING ${iLST} 0 3 subStrTmp )
38 IF( ${subStrTmp} STREQUAL "../" )
40 ELSE( ${subStrTmp} STREQUAL "../" )
41 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/xml-templates/${iLST}
42 ${BBTK_DATA_BUILD_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA}/xml-templates/${iLST}
44 ENDIF( ${subStrTmp} STREQUAL "../" )
46 # Install the build tree folder
48 DIRECTORY ${BBTK_DATA_BUILD_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA}/xml-templates
49 DESTINATION ${BBTK_DATA_INSTALL_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA}
52 # Configure / Install the script bbCreateBlackBox
53 SET(bbCreateBlackBox_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA})
54 FILE(TO_NATIVE_PATH ${bbCreateBlackBox_DATA_REL_PATH_FROM_BIN} bbCreateBlackBox_DATA_REL_PATH_FROM_BIN)
58 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
59 ${bbtk_BINARY_DIR}/RelWithDebInfo/bbCreateBlackBox.bat
63 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
64 ${bbtk_BINARY_DIR}/Debug/bbCreateBlackBox.bat
68 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
69 ${bbtk_BINARY_DIR}/Release/bbCreateBlackBox.bat
74 PROGRAMS ${bbtk_BINARY_DIR}/Debug/bbCreateBlackBox.bat
83 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.sh.in
84 ${bbtk_BINARY_DIR}/bin/bbCreateBlackBox
89 FILES ${bbtk_BINARY_DIR}/bin/bbCreateBlackBox
91 PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE