-
+# Configure & install images
BBTK_DOC_INSTALL_IMAGES(bbtkWebSite)
-#FILE(GLOB PNG_IMAGES "." "*.png")
-#FOREACH(image ${PNG_IMAGES})
-# GET_FILENAME_COMPONENT(filename "${image}" NAME)
-# CONFIGURE_FILE(
-# ${image}
-# ${CMAKE_CURRENT_BINARY_DIR}/${filename}
-# COPYONLY
-# )
-#ENDFOREACH(image)
-
-# Configure for build tree and install
+# Configure html pages for build tree and install
FILE(GLOB HTML_PAGES "." "*.html")
FOREACH(page ${HTML_PAGES})
GET_FILENAME_COMPONENT(filename "${page}" NAME)
CONFIGURE_FILE(
${page}
- ${CMAKE_CURRENT_BINARY_DIR}/${filename}
+ ${BBTK_DOC_BUILD_PATH}/bbtkWebSite/${filename}
@ONLY
)
# Install
INSTALL(
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${filename}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_INSTALL_PATH}/bbtkWebSite
+ FILES ${BBTK_DOC_BUILD_PATH}/bbtkWebSite/${filename}
+ DESTINATION ${BBTK_DOC_INSTALL_PATH}/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
+ )
+
+IF (WIN32)
+ SET(command00 Path=%WXWIN%/lib/vc_dll/__RR__%VTK_DIR%__RR__%ITK_DIR%/../../bin/__RR__%PATH% )
+ STRING(REPLACE "__RR__" "\;" command0 ${command00} )
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${INDEX_OUTPUT}
+ COMMAND
+ set ${command0} cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N -q ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
+ DEPENDS ${BBTK_BBI_DEPENDENCY} ${BBTK_PACKAGES_DEPS}
+ )
+ELSE (WIN32)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${INDEX_OUTPUT}
+ COMMAND
+ cd ${BBTK_BIN_PATH} && export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBI} -N -q ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
+ DEPENDS ${BBTK_BBI_DEPENDENCY} ${BBTK_PACKAGES_DEPS}
+ )
+ENDIF (WIN32)
+
+ADD_CUSTOM_TARGET(bbdoc_index ALL
+ DEPENDS ${INDEX_OUTPUT}
+ )
+INSTALL(
+ FILES ${INDEX_OUTPUT}
+ DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
+ )
+# 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
+ )
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/bbtk-make-index.sh.in
+ ${BBTK_BIN_PATH}/bbtk-make-index
+ @ONLY
+ )
+INSTALL(
+ PROGRAMS ${BBTK_BBDOC_BUILD_PATH}/bbtk-make-index
+ DESTINATION bin
+ )