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 # ------------------------------------------------------------------------ */
27 MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
28 # Creates output dir if it does not exist
29 MKDIR(${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME})
31 # Create file make_doc_${PACKAGE_NAME}.bbs
32 SET(OUTPUT_PATH ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/appli)
33 SET(OUTPUT_FILE ${OUTPUT_PATH}/make_doc_${PACKAGE_NAME}.bbs)
34 SET(DOC_OUTPUT ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}/index.html)
37 "#-----------------------------------------\n"
38 "# Generates the html doc for package '${PACKAGE_NAME}'\n"
39 "# Automatically generated by cmake (macro BBTK_CREATE_PACKAGE_BBDOC)\n")
42 "#-----------------------------------------\n"
44 "include ${PACKAGE_NAME}\n"
45 "include ${PACKAGE_NAME}-appli\n"
46 "#-----------------------------------------\n"
47 # "graph ${PACKAGE_NAME} 0 0 ${DOC_OUTPUT} \"${CMAKE_CURRENT_BINARY_DIR}/header.html\" \"Package ${PACKAGE_NAME} documentation\"\n"
48 "graph ${PACKAGE_NAME} 0 0 ${DOC_OUTPUT} \"${BBTK_BBDOC_BUILD_PATH}/${BBTK_PACKAGE_NAME}/header.html\" \"Package ${PACKAGE_NAME} documentation\"\n"
54 DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/appli
59 DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/appli
68 # FILE(TO_NATIVE_PATH ${EXECUTABLE_OUTPUT_PATH}/bb${BBTK_PACKAGE_NAME}.dll pathCommand2 )
69 FILE(TO_NATIVE_PATH ${BBTK_BIN_PATH}/bbtk_config.xml pathCommand2 )
70 FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR}/${BBTK_BBS_REL_PATH} pathCommand1 )
71 set(command1 cd ${pathCommand1})
72 set(command2 copy ${pathCommand2} . )
73 set(command3 ${BBTK_BBI} -N -q ${OUTPUT_FILE})
74 set(command4 echo done)
75 #del bb${BBTK_PACKAGE_NAME}.dll)
80 # cd ${BBTK_BIN_PATH}/../bbs/ && ${BBTK_BBI} -n ${OUTPUT_FILE}
81 set ${DLL_PATH} && ${command1} && ${command2} && ${command3}
83 DEPENDS bb${PACKAGE_NAME}
86 SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LIBRARY_OUTPUT_PATH}")
90 cd ${EXECUTABLE_OUTPUT_PATH} && export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBI} -N -q ${OUTPUT_FILE} ${BBTK_MAKE_INDEX}
91 DEPENDS bb${PACKAGE_NAME}
96 ADD_CUSTOM_TARGET(bbdoc_${PACKAGE_NAME} ALL
102 DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}
103 DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
104 #DESTINATION ${BBTK_BBDOC_REL_PATH}
108 DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}
109 #DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
110 DESTINATION ${BBTK_BBDOC_REL_PATH}
115 # runs bbtk-make-index as a post install step
116 # does not work on windaube
117 IF(NOT BBTK_CORE_PACKAGE)
118 INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${BBTK_BIN_PATH}/bbtk-make-index)")
119 ENDIF(NOT BBTK_CORE_PACKAGE)
123 ENDMACRO(BBTK_CREATE_PACKAGE_BBDOC NAME)