#-----------------------------------------------------------------------------
# Applications (bbi, bbfy...)
-OPTION(BUILD_APPLICATIONS "Build Applications (bbi, bbfy, ...)" ON)
IF(BUILD_APPLICATIONS)
SUBDIRS(appli)
ENDIF(BUILD_APPLICATIONS)
BBS="${TMP%%.*}"
OUTPUT="bb${BBS}"
EXEC_FUNCTION="${BBS}"
-echo Output=\"${OUTPUT}\"
+#echo Output=\"${OUTPUT}\"
WORKDIR=bbc_tmp
mkdir ${WORKDIR}
sed s,OUTPUT,${OUTPUT},g ${DATADIR}/CMakeLists.txt.in > ${WORKDIR}/CMakeLists.txt
sed s,EXEC_FUNCTION,${EXEC_FUNCTION},g ${DATADIR}/main.cxx.in > ${WORKDIR}/main.cxx
cd ${WORKDIR}
-bbs2cpp ${IN}
-cmake .
-#cmake .
-#cmake .
-make
+bbs2cpp ${IN} > log.txt
+cmake . > log.txt
+make > log.txt
mv ${OUTPUT} ${CUR}/
cd ${CUR}
rm -Rf ${WORKDIR}
# TO DO : use computed path for build/install tree
SET(BBTK_BBI "${BBTK_DIR}/bin/bbi")
+SET(BBTK_BBS2CPP "${BBTK_DIR}/bin/bbs2cpp")
+SET(BBTK_BBC "${BBTK_DIR}/bin/bbc")
SET(BBTK_BBFY "${BBTK_DIR}/bin/bbfy")
SET(BBTK_BBDOC "${BBTK_DIR}/bin/bbdoc")
ENDIF(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI)
#----------------------------------------------------------------------------
+#----------------------------------------------------------------------------
INCLUDE(${BBTK_CMAKE_DIR}/BBTKCreatePackageIncludeScript.cmake)
BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT(
"${${BBTK_PACKAGE_NAME}_BBS_BOXES}"
"${${BBTK_PACKAGE_NAME}_BBS_APPLI}"
)
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+IF(BBTK_CORE_PACKAGE)
+ # If a core package set option from bbtk global one
+ IF (BUILD_BBS_APPLI_BINARIES)
+ SET(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_BBS_APP ON)
+ ELSE (BUILD_BBS_APPLI_BINARIES)
+ SET(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_BBS_APP OFF)
+ ENDIF (BUILD_BBS_APPLI_BINARIES)
+ELSE(BBTK_CORE_PACKAGE)
+ # If not a core package
+ # Create the option
+ OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_BBS_APP
+ "Build binaries for bbs applications of package ${BBTK_PACKAGE_NAME} ?" OFF)
+ SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_BBS_APP)
+ENDIF(BBTK_CORE_PACKAGE)
+#---------------------------------------------------------------------------
+
+
+IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_BBS_APP)
+ FOREACH(bbs ${${BBTK_PACKAGE_NAME}_BBS_APPLI})
+ GET_FILENAME_COMPONENT(name "${bbs}" NAME_WE)
+ SET(OUTPUT bb${name})
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${BBTK_BIN_PATH}/${OUTPUT}
+ COMMAND
+ cd ${BBTK_BIN_PATH} && ${BBTK_BBC} ${BBTK_PACKAGE_NAME}/appli/${name}
+ DEPENDS ${bbs}
+ ${BBTK_BBS2CPP_DEPENDENCY}
+ )
+ INSTALL(
+ FILES ${BBTK_BIN_PATH}/${OUTPUT}
+ DESTINATION bin
+ )
+ ADD_CUSTOM_TARGET(${OUTPUT} ALL
+ DEPENDS ${BBTK_BIN_PATH}/${OUTPUT}
+ )
+
+
+ ENDFOREACH(bbs)
+ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_BBS_APP)
+#----------------------------------------------------------------------------
#---------------------------------------------------------------------------
-# If not a core package
-# Create the build doc options
-IF(NOT BBTK_CORE_PACKAGE)
+IF(BBTK_CORE_PACKAGE)
+ # If a core package set doc options from bbtk global ones
+ IF (BUILD_BBTK_DOC_PACKAGE)
+ SET(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC ON)
+ ELSE (BUILD_BBTK_DOC_PACKAGE)
+ SET(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC OFF)
+ ENDIF (BUILD_BBTK_DOC_PACKAGE)
+ IF (BUILD_BBTK_DOC_DOXYGEN)
+ SET(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC ON)
+ ELSE (BUILD_BBTK_DOC_DOXYGEN)
+ SET(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC OFF)
+ ENDIF (BUILD_BBTK_DOC_DOXYGEN)
+ELSE(BBTK_CORE_PACKAGE)
+ # If not a core package
+ # Create the build doc options
OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC
"Build the bbtk package ${BBTK_PACKAGE_NAME} html documentation ?" OFF)
SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
- IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
- SET(BUILD_bbtk_DOC_PACKAGE ON)
- ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC
"Build the bbtk package ${BBTK_PACKAGE_NAME} doxygen documentation ?" OFF)
SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
- IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
- SET(BUILD_bbtk_DOC_DOXYGEN ON)
- ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
-ENDIF(NOT BBTK_CORE_PACKAGE)
+ENDIF(BBTK_CORE_PACKAGE)
#---------------------------------------------------------------------------
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Doxygen
#----------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC_DOXYGEN)
+IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
SET(${BBTK_PACKAGE_NAME}_DOXYGEN_REL_PATH ${BBTK_PACKAGE_NAME})
SUBDIRS(doxygen)
-ENDIF(BUILD_bbtk_DOC_DOXYGEN)
+ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# bbdoc
#---------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC_PACKAGE)
+IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
SUBDIRS(bbdoc)
-ENDIF(BUILD_bbtk_DOC_PACKAGE)
+ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
#---------------------------------------------------------------------------
OPTION ( BBTK_COMPILE_WARNING_MESSAGES "Compile bbtk warning messages ?" ON)
OPTION ( BBTK_COMPILE_ERROR_MESSAGES "Compile bbtk error messages ?" ON)
#-----------------------------------------------------------------------------
+OPTION(BUILD_APPLICATIONS "Build Applications (bbi, bbfy, ...)" ON)
+OPTION(BUILD_BBS_APPLI_BINARIES "Build binaries for bbs applications of all packages" OFF)
+SWITCH_ON_IF_BUILD_ALL(BUILD_BBS_APPLI_BINARIES)
+#-----------------------------------------------------------------------------
+OPTION(BUILD_BBTK_DOC "Build documentation for bbtk." OFF)
+SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_DOC)
+#-----------------------------------------------------------------------------
+IF(BUILD_BBTK_DOC)
+
+ OPTION(BUILD_BBTK_DOC_PACKAGE
+ "Build bbtk packages documentation (bbi+dot)." ON)
+ OPTION(BUILD_BBTK_DOC_DOXYGEN
+ "Build doxygen documentation (doxygen)." ON)
+ OPTION(BUILD_BBTK_DOC_GUIDES_PDF
+ "Build bbtk Guides', PDF format (latex)." ON)
+ OPTION(BUILD_BBTK_DOC_GUIDES_HTML
+ "Build bbtk Guides', HTML format (latex+tth)." ON)
+
+ELSE(BUILD_BBTK_DOC)
+
+ IF(BUILD_BBTK_DOC_PACKAGE)
+ SET(BUILD_BBTK_DOC_PACKAGE OFF CACHE BOOL
+ "Build bbtk packages documentation (bbdoc+dot)." FORCE)
+ ENDIF(BUILD_BBTK_DOC_PACKAGE)
+ IF(BUILD_BBTK_DOC_DOXYGEN)
+ SET(BUILD_BBTK_DOC_DOXYGEN OFF CACHE BOOL
+ "Build doxygen documentation. (doxygen)" FORCE)
+ ENDIF(BUILD_BBTK_DOC_DOXYGEN)
+
+ IF(BUILD_BBTK_DOC_GUIDES_PDF)
+ SET(BUILD_BBTK_DOC_GUIDES_PDF OFF CACHE BOOL
+ "Build bbtk Guides', PDF format (latex)." FORCE)
+ ENDIF(BUILD_BBTK_DOC_GUIDES_PDF)
+
+ IF(BUILD_BBTK_DOC_GUIDES_HTML)
+ SET(BUILD_BBTK_DOC_GUIDES_HTML OFF CACHE BOOL
+ "Build bbtk Guides', HTML format (latex tth)." FORCE)
+ ENDIF(BUILD_BBTK_DOC_GUIDES_HTML)
+# IF(BUILD_BBTK_DOC_SCRIPTS)
+# SET(BUILD_BBTK_DOC_SCRIPTS_HTML OFF CACHE BOOL
+# "Build bbtk scripts documentation (bbi+dot)." FORCE)
+# ENDIF(BUILD_BBTK_DOC_SCRIPTS)
+
+ENDIF(BUILD_BBTK_DOC)
+#-----------------------------------------------------------------------------
ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
SET(BBTK_BIN_PATH $(SolutionDir)/$(OutDir))
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+ SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp.exe)
+ SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc.exe)
SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi.exe)
SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy.exe)
SET(BBTK_BBDOC ${BBTK_BIN_PATH}/bbdoc.exe)
ELSE(WIN32)
SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH})
SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi)
+ SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp)
+ SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc)
SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy)
SET(BBTK_BBDOC ${BBTK_BIN_PATH}/bbdoc)
ENDIF(WIN32)
SET(BBTK_BBI_DEPENDENCY ${BBTK_BBI})
ENDIF(EXISTS "${BBTK_BBI}")
+ IF(EXISTS "${BBTK_BBS2CPP}")
+ SET(BBTK_BBS2CPP_DEPENDENCY)
+ ELSE(EXISTS "${BBTK_BBS2CPP}")
+ SET(BBTK_BBS2CPP_DEPENDENCY ${BBTK_BBS2CPP})
+ ENDIF(EXISTS "${BBTK_BBS2CPP}")
IF(EXISTS "${BBTK_BBFY}")
SET(BBTK_BBFY_DEPENDENCY)
#-----------------------------------------------------------------------------
-OPTION(BUILD_bbtk_DOC "Build documentation for bbtk." OFF)
-SWITCH_ON_IF_BUILD_ALL(BUILD_bbtk_DOC)
-#-----------------------------------------------------------------------------
-
-
-#-----------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC)
-
- OPTION(BUILD_bbtk_DOC_PACKAGE
- "Build bbtk packages documentation (bbi+dot)." ON)
- OPTION(BUILD_bbtk_DOC_DOXYGEN
- "Build doxygen documentation (doxygen)." ON)
- OPTION(BUILD_bbtk_DOC_GUIDES_PDF
- "Build bbtk Guides', PDF format (latex)." ON)
- OPTION(BUILD_bbtk_DOC_GUIDES_HTML
- "Build bbtk Guides', HTML format (latex+tth)." ON)
-
-ELSE(BUILD_bbtk_DOC)
-
- IF(BUILD_bbtk_DOC_PACKAGE)
- SET(BUILD_bbtk_DOC_PACKAGE OFF CACHE BOOL
- "Build bbtk packages documentation (bbdoc+dot)." FORCE)
- ENDIF(BUILD_bbtk_DOC_PACKAGE)
- IF(BUILD_bbtk_DOC_DOXYGEN)
- SET(BUILD_bbtk_DOC_DOXYGEN OFF CACHE BOOL
- "Build doxygen documentation. (doxygen)" FORCE)
- ENDIF(BUILD_bbtk_DOC_DOXYGEN)
-
- IF(BUILD_bbtk_DOC_GUIDES_PDF)
- SET(BUILD_bbtk_DOC_GUIDES_PDF OFF CACHE BOOL
- "Build bbtk Guides', PDF format (latex)." FORCE)
- ENDIF(BUILD_bbtk_DOC_GUIDES_PDF)
-
- IF(BUILD_bbtk_DOC_GUIDES_HTML)
- SET(BUILD_bbtk_DOC_GUIDES_HTML OFF CACHE BOOL
- "Build bbtk Guides', HTML format (latex tth)." FORCE)
- ENDIF(BUILD_bbtk_DOC_GUIDES_HTML)
-# IF(BUILD_bbtk_DOC_SCRIPTS)
-# SET(BUILD_bbtk_DOC_SCRIPTS_HTML OFF CACHE BOOL
-# "Build bbtk scripts documentation (bbi+dot)." FORCE)
-# ENDIF(BUILD_bbtk_DOC_SCRIPTS)
-
-ENDIF(BUILD_bbtk_DOC)
-
-
-#-----------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_DOXYGEN)
+IF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_DOXYGEN)
INCLUDE(../cmake/BBTKBuildDoxygenDoc.cmake)
SUBDIRS(bbtkDoxygen)
-ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_DOXYGEN)
+ENDIF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_DOXYGEN)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF)
+IF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_PDF)
INCLUDE(../cmake/BBTKBuildLatexDoc.cmake)
-ELSE(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+ELSE(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_HTML)
MACRO(BBTK_BUILD_LATEX_DOC TEX_FILE)
ENDMACRO(BBTK_BUILD_LATEX_DOC)
-ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF)
+ENDIF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_PDF)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+IF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_HTML)
INCLUDE(../cmake/BBTKBuildHtmlDocFromLatex.cmake)
-ELSE(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+ELSE(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_HTML)
MACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX SOURCE)
ENDMACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX)
-ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
-ENDIF(BUILD_bbtk_DOC_GUIDES_PDF)
+ENDIF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_HTML)
+ENDIF(BUILD_BBTK_DOC_GUIDES_PDF)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF OR BUILD_bbtk_DOC_GUIDES_HTML)
+IF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_PDF OR BUILD_BBTK_DOC_GUIDES_HTML)
SUBDIRS(bbtkUsersGuide)
SUBDIRS(bbtkPackageDevelopersGuide)
SUBDIRS(bbtkDevelopersGuide)
-ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF OR BUILD_bbtk_DOC_GUIDES_HTML)
+ENDIF(BUILD_BBTK_DOC AND BUILD_BBTK_DOC_GUIDES_PDF OR BUILD_BBTK_DOC_GUIDES_HTML)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Web site
-IF(BUILD_bbtk_DOC)
+IF(BUILD_BBTK_DOC)
# Configure main page index.html for build tree
CONFIGURE_FILE(
index.html.in
-ENDIF(BUILD_bbtk_DOC)
+ENDIF(BUILD_BBTK_DOC)
#-----------------------------------------------------------------------------