## --Configure and installing bbs boxes--
# --Creates the file ${BBTK_PACKAGE_NAME}.bbp--
+
+## bbpConfigurator create de PACKAGE.bbp file
+## bbConfigurator <path_to_bbs> <package_name> <output_path>
+
+
SET(OUTPUT_FILE ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}.bbp)
- FILE(WRITE
- "${OUTPUT_FILE}"
- "#-----------------------------------------\n"
- "# Include script for bbtk package '${BBTK_PACKAGE_NAME}'\n"
- "# Automatically generated by cmake (macro BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT)\n")
- FILE(APPEND
- "${OUTPUT_FILE}"
- "#-----------------------------------------\n"
- "load ${BBTK_PACKAGE_NAME}\n"
- "#-----------------------------------------\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}"
- "#-----------------------------------------\n"
- "include ${BBTK_PACKAGE_NAME}/${bbs}\n"
+
+ IF (WIN32)
+ MAKE_DLL_PATH()
+ # SET(command00 Path=c:/creatis/dlls__RR__%WXWIN%/lib/vc_dll/__RR__%VTK_DIR%__RR__%ITK_DIR%/../../bin/__RR__%PATH%)
+ # STRING(REPLACE "__RR__" "\;" SETPATH ${command00} )
+ # SET(SETPATH set ${command0} &&)
+
+
+ ADD_CUSTOM_TARGET( bb${BBTK_PACKAGE_NAME}.bbp ALL
+## COMMAND "set Path=${DLL_PATH} && ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}\boxes\ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/"
+ COMMAND ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}/boxes/ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/
+ )
+
+
+ ELSE(WIN32)
+ SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LIBRARY_OUTPUT_PATH}")
+ ADD_CUSTOM_TARGET( bb${BBTK_PACKAGE_NAME}.bbp ALL
+## COMMAND export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}/boxes/ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/
+ COMMAND ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}/boxes/ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/
+ )
+
+
+
+
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}.bbp
+## COMMAND export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
+ COMMAND ls
+# COMMAND ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}/boxes/ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/
+## DEPENDS
+## ${xmlfile}
+## ${BBTK_BBPCREATOR_DEPENDENCY}
)
+
+ ENDIF(WIN32)
+
+
+
+##EED 24/06/2013
+## FILE(WRITE
+## "${OUTPUT_FILE}"
+## "#-----------------------------------------\n"
+## "# Include script for bbtk package '${BBTK_PACKAGE_NAME}'\n"
+## "# Automatically generated by cmake (macro BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT)\n")
+## FILE(APPEND
+## "${OUTPUT_FILE}"
+## "#-----------------------------------------\n"
+## "load ${BBTK_PACKAGE_NAME}\n"
+## "#-----------------------------------------\n"
+## "package ${BBTK_PACKAGE_NAME}\n"
+## )
+##
+## #FILE(APPEND
+## # "${OUTPUT_FILE}"
+## # "#-----------------------------------------\n"
+## # "include ${BBTK_PACKAGE_NAME}/boxes/*\n"
+## # )
+##
+
+ FOREACH(bbs ${BBTK_PACKAGE_BBS_BOXES})
+
+##EED 24/06/2013
+## FILE(APPEND
+## "${OUTPUT_FILE}"
+## "#-----------------------------------------\n"
+## "include ${BBTK_PACKAGE_NAME}/${bbs}\n"
+## )
+
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${bbs}
IF(WIN32)
- INSTALL(
- FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
-# DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
- DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
- )
-ELSE(WIN32)
-INSTALL(
- FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
- DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
-# DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
- )
-ENDIF(WIN32)
+ INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
+# DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ )
+ ELSE(WIN32)
+ INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
+ DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+# DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ )
+ ENDIF(WIN32)
+
ENDFOREACH(bbs)
- ## --Configure and installing bbs appli--
- FILE(APPEND
- "${OUTPUT_FILE}"
- "#-----------------------------------------\n"
- "endpackage\n"
- "#-- EOF ----------------------------------\n"
- )
+##EED 24/06/2013
+## ## --Configure and installing bbs appli--
+## FILE(APPEND
+## "${OUTPUT_FILE}"
+## "#-----------------------------------------\n"
+## "endpackage\n"
+## "#-- EOF ----------------------------------\n"
+## )
+
IF(WIN32)
INSTALL(
FILES ${OUTPUT_FILE}
# DESTINATION ${BBTK_BBS_REL_PATH}
)
ENDIF(WIN32)
+
+
+
+
# Creates the file ${BBTK_PACKAGE_NAME}-appli.bbp
SET(OUTPUT_FILE ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}-appli.bbp)
FILE(WRITE
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_BBPCONFIGURATOR ${BBTK_BIN_PATH}/bbpConfigurator.exe)
ELSE(WIN32)
# For Xcode : have to test the cmake generator !
SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp)
SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc)
SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy)
+ SET(BBTK_BBPCONFIGURATOR ${BBTK_BIN_PATH}/bbpConfigurator)
ENDIF(WIN32)
SET(BBTK_PACKAGE_LIB_PATH ${BBTK_LIB_PATH})
MESSAGE(STATUS "* BBTK_BBS2CPP =${BBTK_BBS2CPP}")
MESSAGE(STATUS "* BBTK_BBC =${BBTK_BBC}")
MESSAGE(STATUS "* BBTK_BBFY =${BBTK_BBFY}")
+MESSAGE(STATUS "* BBTK_BBPCONFIGURATOR =${BBTK_BBPCONFIGURATOR}")
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------