From 873209c34eae7eec41042acc435b514f73f39cc4 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 4 Jul 2013 17:43:18 +0200 Subject: [PATCH] 2042 Feature bbpConfigurator --- kernel/cmake/BBTKConfigurePackage_src.cmake | 42 +++++++++++++++++-- .../BBTKCreatePackageIncludeScript.cmake | 15 ++++--- 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/kernel/cmake/BBTKConfigurePackage_src.cmake b/kernel/cmake/BBTKConfigurePackage_src.cmake index 6aa4425..aea7925 100644 --- a/kernel/cmake/BBTKConfigurePackage_src.cmake +++ b/kernel/cmake/BBTKConfigurePackage_src.cmake @@ -89,6 +89,8 @@ ENDIF(NOT PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) #---------------------------------------------------------------------------- + + #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # bbfy @@ -112,10 +114,15 @@ FOREACH(xmlfile ${${BBTK_PACKAGE_NAME}_XML_SOURCES}) # STRING(REPLACE "__RR__" "\;" SETPATH ${command00} ) # SET(SETPATH set ${command0} &&) + ADD_CUSTOM_COMMAND( - OUTPUT ${BBFY_CXX_OUT} - COMMAND - set Path=${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q + OUTPUT ${BBFY_CXX_OUT} + COMMAND echo ${BBFY_CXX_OUT} + COMMAND echo set "Path=${crea_DIR}/bin/\;"${DLL_PATH} + COMMAND echo ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q + COMMAND echo ${BBFY_CXX_OUT} + COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q + ## COMMAND set Path=${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q DEPENDS ${xmlfile} ${BBTK_BBFY_DEPENDENCY} ) @@ -298,3 +305,32 @@ IF(CHCON_LIBRARIES) ENDIF(CHCON_LIBRARIES) #---------------------------------------------------------------------------- + + +#---------------------------------------------------------------------------- +# bbpConfigurator +#---------------------------------------------------------------------------- +# --Creates the file ${BBTK_PACKAGE_NAME}.bbp-- +## bbpConfigurator create de PACKAGE.bbp file +## bbConfigurator + + 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_COMMAND( + TARGET bb${BBTK_PACKAGE_NAME} PRE_BUILD + COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && $(OutDir)/bbpConfigurator.exe ${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}/ + ) + + ENDIF(WIN32) + diff --git a/kernel/cmake/BBTKCreatePackageIncludeScript.cmake b/kernel/cmake/BBTKCreatePackageIncludeScript.cmake index 0eb2d32..7dcb572 100644 --- a/kernel/cmake/BBTKCreatePackageIncludeScript.cmake +++ b/kernel/cmake/BBTKCreatePackageIncludeScript.cmake @@ -94,13 +94,17 @@ MACRO(BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT BBTK_PACKAGE_NAME BBTK_PACKAGE_BB # STRING(REPLACE "__RR__" "\;" SETPATH ${command00} ) # SET(SETPATH set ${command0} &&) +## SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) ## ADD_CUSTOM_TARGET( bb${BBTK_PACKAGE_NAME}.bbp ALL ## COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && $(OutDir)/../../Release/bbpConfigurator.exe ${CMAKE_CURRENT_SOURCE_DIR}/boxes/ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/ ## ) - - ADD_CUSTOM_COMMAND( TARGET bb${BBTK_PACKAGE_NAME} - COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && $(OutDir)/../../Release/bbpConfigurator.exe ${CMAKE_CURRENT_SOURCE_DIR}/boxes/ ${BBTK_PACKAGE_NAME} ${BBTK_BBS_BUILD_PATH}/ - ) + +## ADD_CUSTOM_COMMAND( +## OUTPUT a +## TARGET bb${BBTK_PACKAGE_NAME} PRE_BUILD +## COMMAND dir +## COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && $(OutDir)/../../Release/bbpConfigurator.exe ${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}") @@ -108,8 +112,7 @@ MACRO(BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT BBTK_PACKAGE_NAME BBTK_PACKAGE_BB ## 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}/ ) - - + ENDIF(WIN32) -- 2.47.1