]> Creatis software - bbtk.git/commitdiff
2042 Feature bbpConfigurator
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Thu, 4 Jul 2013 15:43:18 +0000 (17:43 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Thu, 4 Jul 2013 15:43:18 +0000 (17:43 +0200)
kernel/cmake/BBTKConfigurePackage_src.cmake
kernel/cmake/BBTKCreatePackageIncludeScript.cmake

index 6aa44254ed5594f874a128f8f1894641a77cc043..aea7925dcc308cd2b3a04b36ed9790cd1bfe554d 100644 (file)
@@ -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 <path_to_bbs> <package_name> <output_path>
+
+  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)
+
index 0eb2d321edd863f671b81849b9fe3ba32d50b840..7dcb5721f8ac85e6fbb300bcb7aaa6e3aa844835 100644 (file)
@@ -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)