]> Creatis software - bbtk.git/blobdiff - kernel/cmake/BBTKCreatePackageBBdoc.cmake
#3194 BBTK Feature New Normal - Update surfaceTexture box with new lookuptables
[bbtk.git] / kernel / cmake / BBTKCreatePackageBBdoc.cmake
index c00536ea8b7b255c44526b09a48e7b2c9d8f6a42..dc1c8f6e37b29b25cdf713745a2475ab1d442b34 100644 (file)
@@ -1,3 +1,29 @@
+ # ---------------------------------------------------------------------
+ #
+ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+ #                        pour la SantÈ)
+ # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+ # Previous Authors : Laurent Guigues, Jean-Pierre Roux
+ # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+ #
+ #  This software is governed by the CeCILL-B license under French law and
+ #  abiding by the rules of distribution of free software. You can  use,
+ #  modify and/ or redistribute the software under the terms of the CeCILL-B
+ #  license as circulated by CEA, CNRS and INRIA at the following URL
+ #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+ #  or in the file LICENSE.txt.
+ #
+ #  As a counterpart to the access to the source code and  rights to copy,
+ #  modify and redistribute granted by the license, users are provided only
+ #  with a limited warranty  and the software's author,  the holder of the
+ #  economic rights,  and the successive licensors  have only  limited
+ #  liability.
+ #
+ #  The fact that you are presently reading this means that you have had
+ #  knowledge of the CeCILL-B license and that you accept its terms.
+ # ------------------------------------------------------------------------ */
+
+
 MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
   # Creates output dir if it does not exist
   MKDIR(${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME})
@@ -22,19 +48,23 @@ MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
     "graph ${PACKAGE_NAME} 0 0 ${DOC_OUTPUT} \"${BBTK_BBDOC_BUILD_PATH}/${BBTK_PACKAGE_NAME}/header.html\" \"Package ${PACKAGE_NAME} documentation\"\n"
 
     )
+  IF(WIN32)
+  INSTALL(
+    FILES ${OUTPUT_FILE}
+    DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/appli
+    )
+  ELSE(WIN32)
   INSTALL(
     FILES ${OUTPUT_FILE}
     DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/appli
     )
+  ENDIF(WIN32)
   
 
   #
   IF(WIN32)
     SET(USE_DOT TRUE)
-    # %DOT_DIR%
-    # set(command00  Path=C:/Creatis/dlls__RR__%WXWIN%/lib/vc_dll/__RR__%VTK_DIR%__RR__%ITK_DIR%/../../bin/__RR__${DOT_DIR}__RR__%PATH% )
-    # STRING(REPLACE "__RR__" "\;" command0 ${command00} ) 
+    MAKE_DLL_PATH()
 #    FILE(TO_NATIVE_PATH ${EXECUTABLE_OUTPUT_PATH}/bb${BBTK_PACKAGE_NAME}.dll  pathCommand2 )  
     FILE(TO_NATIVE_PATH  ${BBTK_BIN_PATH}/bbtk_config.xml pathCommand2 )       
     FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR}/${BBTK_BBS_REL_PATH} pathCommand1 )
@@ -48,7 +78,7 @@ MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
       OUTPUT ${DOC_OUTPUT}
       COMMAND 
       #    cd ${BBTK_BIN_PATH}/../bbs/ && ${BBTK_BBI} -n ${OUTPUT_FILE}
-      set ${CREA_PATH} && ${command1} && ${command2} && ${command3} 
+      set ${DLL_PATH} && ${command1} && ${command2} && ${command3} 
       #&& ${command4}
       DEPENDS bb${PACKAGE_NAME} 
       )
@@ -60,21 +90,34 @@ MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
       cd ${EXECUTABLE_OUTPUT_PATH} && export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBI} -N -q ${OUTPUT_FILE} ${BBTK_MAKE_INDEX}
       DEPENDS bb${PACKAGE_NAME} 
       )
+
+
   ENDIF(WIN32)
   ADD_CUSTOM_TARGET(bbdoc_${PACKAGE_NAME} ALL
     DEPENDS ${DOC_OUTPUT} 
     )
 
+  IF(WIN32)
   INSTALL( 
     DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}
     DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
+    #DESTINATION ${BBTK_BBDOC_REL_PATH}
     )   
-  
-  # runs bbtk-make-index as a post install step
-  IF(NOT BBTK_CORE_PACKAGE)
-    INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${BBTK_BIN_PATH}/bbtk-make-index)")
-  ENDIF(NOT BBTK_CORE_PACKAGE)
+  ELSE(WIN32)
+  INSTALL( 
+    DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}
+    #DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
+    DESTINATION ${BBTK_BBDOC_REL_PATH}
+    )   
+  ENDIF(WIN32)
 
+  IF(NOT WIN32)
+    # runs bbtk-make-index as a post install step
+    # does not work on windaube
+    IF(NOT BBTK_CORE_PACKAGE)
+      INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${BBTK_BIN_PATH}/bbtk-make-index)")
+    ENDIF(NOT BBTK_CORE_PACKAGE)
+  ENDIF(NOT WIN32)
 
   
 ENDMACRO(BBTK_CREATE_PACKAGE_BBDOC NAME)