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 bbCreatePackage.bat/.sh
27 # used to creates the file architecture for a new user package
29 # go to data which install the input data to the script
30 #ADD_SUBDIRECTORY(data)
32 # Sets the data install path
40 # Relative path to the data used by bbCreatePackage from data root folder
41 SET(bbCreatePackage_DATA_REL_PATH_FROM_DATA kernel/bbCreatePackage)
43 # Configure / Install the empty package structure used by bbCreatePackage
44 # Copy it into build tree
45 FILE(GLOB_RECURSE LST_FILE_VOID_CREATE_PACKAGE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/void-Package *.txt *.in *.cmake )
46 FOREACH( iLST ${LST_FILE_VOID_CREATE_PACKAGE})
47 STRING(SUBSTRING ${iLST} 0 3 subStrTmp )
48 IF( ${subStrTmp} STREQUAL "../" )
50 ELSE( ${subStrTmp} STREQUAL "../" )
51 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/void-Package/${iLST}
52 ${BBTK_DATA_BUILD_PATH}/${bbCreatePackage_DATA_REL_PATH_FROM_DATA}/void-Package/${iLST}
54 ENDIF( ${subStrTmp} STREQUAL "../" )
56 # Install the build tree folder
58 DIRECTORY ${BBTK_DATA_BUILD_PATH}/${bbCreatePackage_DATA_REL_PATH_FROM_DATA}/void-Package
59 DESTINATION ${BBTK_DATA_INSTALL_PATH}/${bbCreatePackage_DATA_REL_PATH_FROM_DATA}
62 # Configure / Install the script bbCreatePackage
63 SET(bbCreatePackage_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbCreatePackage_DATA_REL_PATH_FROM_DATA})
64 FILE(TO_NATIVE_PATH ${bbCreatePackage_DATA_REL_PATH_FROM_BIN} bbCreatePackage_DATA_REL_PATH_FROM_BIN)
69 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bat.in
70 ${bbtk_BINARY_DIR}/RelWithDebInfo/bbCreatePackage.bat
74 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bat.in
75 ${bbtk_BINARY_DIR}/Debug/bbCreatePackage.bat
79 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bat.in
80 ${bbtk_BINARY_DIR}/Release/bbCreatePackage.bat
85 PROGRAMS ${bbtk_BINARY_DIR}/Debug/bbCreatePackage.bat
91 ${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.sh.in
92 ${bbtk_BINARY_DIR}/bin/bbCreatePackage
97 FILES ${bbtk_BINARY_DIR}/bin/bbCreatePackage
99 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE