MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
-
- FILE(MAKE_DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME})
+ # Creates output dir if it does not exist
+ MKDIR(${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME})
# Create file make_doc_${PACKAGE_NAME}.bbs
- SET(OUTPUT_PATH ${BBTK_BBS_BUILD_PATH})
+ SET(OUTPUT_PATH ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/appli)
SET(OUTPUT_FILE ${OUTPUT_PATH}/make_doc_${PACKAGE_NAME}.bbs)
SET(DOC_OUTPUT ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}/index.html)
FILE(WRITE
"graph ${PACKAGE_NAME} 0 0 ${DOC_OUTPUT} \"none\" \"Package ${PACKAGE_NAME} documentation\"\n"
#${BBTK_DOCUMENT_SCRIPTS_OUTPUT_PATH}/header.html
)
+# CONFIGURE_FILE(
+# ${OUTPUT_FILE}
+# ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/appli/make_doc_${PACKAGE_NAME}.bbs
+# COPYONLY
+# )
+# INSTALL(
+# FILES ${OUTPUT_FILE}
+# DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/appli
+# )
ADD_CUSTOM_COMMAND(
OUTPUT ${DOC_OUTPUT}
"#-----------------------------------------\n"
"package ${BBTK_PACKAGE_NAME}\n"
)
+
+ #FILE(APPEND
+ # "${OUTPUT_FILE}"
+ # "#-----------------------------------------\n"
+ # "include ${BBTK_PACKAGE_NAME}/boxes/*\n"
+ # )
+
FOREACH(bbs ${BBTK_PACKAGE_BBS_BOXES})
FILE(APPEND
"${OUTPUT_FILE}"
${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
COPYONLY
)
+ INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
+ DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
+ )
ENDFOREACH(bbs)
FILE(APPEND
"include ${BBTK_PACKAGE_NAME}/${bbs}\n"
"endefine\n"
)
- CONFIGURE_FILE(
+ CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
- COPYONLY
- )
+ COPYONLY
+ )
+ INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
+ DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
+ )
ENDFOREACH(bbs)
FILE(APPEND
"${OUTPUT_FILE}"
)
ENDMACRO(BBTK_DOC_INSTALL_IMAGES)
#========================================================================
+
+#========================================================================
+# Creates a directory if it does not exist
+MACRO(MKDIR DIR)
+ IF(NOT IS_DIRECTORY ${DIR})
+ MESSAGE(STATUS "* Creating directory '${DIR}'")
+ FILE(MAKE_DIRECTORY ${DIR})
+ ENDIF(NOT IS_DIRECTORY ${DIR})
+ENDMACRO(MKDIR)
+#========================================================================
SET(BBTK_BBS_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${BBTK_BBS_REL_PATH})
# Create build directories if necessary
-IF(NOT IS_DIRECTORY ${BBTK_DOC_BUILD_PATH})
- FILE(MAKE_DIRECTORY ${BBTK_DOC_BUILD_PATH})
-ENDIF(NOT IS_DIRECTORY ${BBTK_DOC_BUILD_PATH})
-IF(NOT IS_DIRECTORY ${BBTK_BBDOC_BUILD_PATH})
- FILE(MAKE_DIRECTORY ${BBTK_BBDOC_BUILD_PATH})
-ENDIF(NOT IS_DIRECTORY ${BBTK_BBDOC_BUILD_PATH})
-IF(NOT IS_DIRECTORY ${BBTK_DOXYGEN_BUILD_PATH})
- FILE(MAKE_DIRECTORY ${BBTK_DOXYGEN_BUILD_PATH})
-ENDIF(NOT IS_DIRECTORY ${BBTK_DOXYGEN_BUILD_PATH})
-IF(NOT IS_DIRECTORY ${BBTK_BBS_BUILD_PATH})
- FILE(MAKE_DIRECTORY ${BBTK_BBS_BUILD_PATH})
-ENDIF(NOT IS_DIRECTORY ${BBTK_BBS_BUILD_PATH})
+MKDIR(${BBTK_DOC_BUILD_PATH})
+MKDIR(${BBTK_BBDOC_BUILD_PATH})
+MKDIR(${BBTK_DOXYGEN_BUILD_PATH})
+MKDIR(${BBTK_DOXYGEN_BUILD_PATH})
+MKDIR(${BBTK_BBS_BUILD_PATH})
#MESSAGE(STATUS "doc='${BBTK_DOC_INSTALL_PATH}'")
#-----------------------------------------------------------------------------