+ # ---------------------------------------------------------------------
+ #
+ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+ # pour la SantÈ)
+ # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+ # Previous Authors : Laurent Guigues, Jean-Pierre Roux
+ # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+ #
+ # This software is governed by the CeCILL-B license under French law and
+ # abiding by the rules of distribution of free software. You can use,
+ # modify and/ or redistribute the software under the terms of the CeCILL-B
+ # license as circulated by CEA, CNRS and INRIA at the following URL
+ # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+ # or in the file LICENSE.txt.
+ #
+ # As a counterpart to the access to the source code and rights to copy,
+ # modify and redistribute granted by the license, users are provided only
+ # with a limited warranty and the software's author, the holder of the
+ # economic rights, and the successive licensors have only limited
+ # liability.
+ #
+ # The fact that you are presently reading this means that you have had
+ # knowledge of the CeCILL-B license and that you accept its terms.
+ # ------------------------------------------------------------------------ */
+
+
+MESSAGE(STATUS "")
+MESSAGE(STATUS "=======================================")
+MESSAGE(STATUS "Configuring bbtk html doc")
+
# Configure & install images
BBTK_DOC_INSTALL_IMAGES(bbtkWebSite)
)
ENDFOREACH(page)
-# Index generation
-SET(BBTK_INDEX_ALPHA_FILE ${BBTK_BBDOC_BUILD_PATH}/index-alpha.html)
-SET(BBTK_INDEX_PACKAGES_FILE ${BBTK_BBDOC_BUILD_PATH}/index-package.html)
-SET(BBTK_INDEX_CATEGORIES_FILE ${BBTK_BBDOC_BUILD_PATH}/index-category.html)
-SET(BBTK_INDEX_ADAPTORS_FILE ${BBTK_BBDOC_BUILD_PATH}/index-adaptors.html)
-SET(INDEX_OUTPUT
- ${BBTK_INDEX_ALPHA_FILE} ${BBTK_INDEX_PACKAGES_FILE}
- ${BBTK_INDEX_CATEGORIES_FILE}
- )
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/make-index.bbs.in
- ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
- @ONLY
- )
-ADD_CUSTOM_COMMAND(
- OUTPUT ${INDEX_OUTPUT}
- COMMAND
- cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N -q ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
- DEPENDS ${BBTK_BBI_DEPENDENCY} ${BBTK_PACKAGES_DEPS}
- )
-ADD_CUSTOM_TARGET(bbdoc_index ALL
- DEPENDS ${INDEX_OUTPUT}
- )
-INSTALL(
- FILES ${INDEX_OUTPUT}
- DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
- )
+#===================================================================
+# Regenerate package doc / boxes lists
+# Must be made manually as:
+# 1) Is useless for installers (it is to be run after install)
+# 2) Can be done manually for a build tree (e.g. in bbStudio)
+IF(FALSE)
-# create make-index.bbs for build / install tree
-SET(BBTK_INDEX_ALPHA_FILE index-alpha.html)
-SET(BBTK_INDEX_PACKAGES_FILE index-package.html)
-SET(BBTK_INDEX_CATEGORIES_FILE index-category.html)
-SET(BBTK_INDEX_ADAPTORS_FILE index-adaptors.html)
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/make-index.bbs.in
- ${BBTK_BBDOC_BUILD_PATH}/make-index.bbs
- @ONLY
- )
-INSTALL(
- FILES ${BBTK_BBDOC_BUILD_PATH}/make-index.bbs
- DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
- )
-# bbtk-make-index
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/bbtk-make-index.sh.in
- ${BBTK_BBDOC_BUILD_PATH}/bbtk-make-index
- @ONLY
- )
-INSTALL(
- PROGRAMS ${BBTK_BBDOC_BUILD_PATH}/bbtk-make-index
- DESTINATION bin
+SET(INDEX_OUTPUT index-alpha.html)
+
+IF (WIN32)
+
+ SET(USE_DOT TRUE)
+ MAKE_DLL_PATH()
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${INDEX_OUTPUT}
+ COMMAND
+ set Path=${DLL_PATH} && cd ${BBTK_BIN_PATH} && bbRegeneratePackageDoc -a -q && bbRegenerateBoxesLists -q
+
+ DEPENDS ${BBTK_PACKAGES_DEPS}
+ )
+
+ELSE (WIN32)
+
+ # MESSAGE(STATUS "PACKAGE_DEPS=${BBTK_PACKAGES_DEPS}")
+
+ SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LIBRARY_OUTPUT_PATH}")
+ # MESSAGE(LD_LIBRARY_PATH=${LD_LIBRARY_PATH})
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${INDEX_OUTPUT}
+ COMMAND
+
+ cd ${BBTK_BIN_PATH} && export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ./bbRegeneratePackageDoc -a -q && ./bbRegenerateBoxesLists -q
+
+ DEPENDS ${BBTK_PACKAGES_DEPS} bbRegeneratePackageDoc bbRegenerateBoxesLists
+ )
+
+ENDIF (WIN32)
+
+ADD_CUSTOM_TARGET(
+ bbdoc ALL
+ DEPENDS ${INDEX_OUTPUT}
)
+
+ENDIF(FALSE)
+
+MESSAGE(STATUS "=======================================")