X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fcmake%2FBBTKConfigurePackage.cmake;h=27fea041200fcfe4e6bd148130024f4c70eccf67;hb=789ecd0eb75c3657333605b45faf47c5c37a29c6;hp=319938879cac4b2e6c7fda85aeb62cdb352237e6;hpb=a26b760bbfe886312cbe54bd83b7211f621edf80;p=bbtk.git diff --git a/kernel/cmake/BBTKConfigurePackage.cmake b/kernel/cmake/BBTKConfigurePackage.cmake index 3199388..27fea04 100644 --- a/kernel/cmake/BBTKConfigurePackage.cmake +++ b/kernel/cmake/BBTKConfigurePackage.cmake @@ -1,3 +1,40 @@ + # --------------------------------------------------------------------- + # + # 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. + # ------------------------------------------------------------------------ */ + + +# ================================== +# W A R N I N G ! +# ================================== +# +# This file is dupplicated as BBTKConfigurePackage2.cmake +# +# Only ONE commented out line, in BBTKConfigurePackage2.cmake differs +# :-( +# In case of modification, mind to modify BBTKConfigurePackage2.cmake as well! +# + MESSAGE(STATUS "") MESSAGE(STATUS "=======================================") @@ -105,6 +142,17 @@ IF(${BBTK_PACKAGE_NAME}_USE_ITK) ${${BBTK_PACKAGE_NAME}_LIBS} ${ITK_LIBRARIES} ) + + #Need to add additional gdcm libraries provided by system + IF(WIN32) + IF(USE_GDCM2) + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} + vtkgdcm gdcmIOD gdcmMSFF gdcmexpat gdcmCommon gdcmMEXD gdcmDSED gdcmDICT + gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 socketxx gdcmopenjpeg gdcmcharls + ) + ENDIF() + ENDIF(WIN32) ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK) IF(${BBTK_PACKAGE_NAME}_USE_QT) @@ -115,31 +163,51 @@ IF(${BBTK_PACKAGE_NAME}_USE_QT) ) ENDIF(${BBTK_PACKAGE_NAME}_USE_QT) +#---------- + IF(${BBTK_PACKAGE_NAME}_USE_GDCM) - SET(USE_GDCM OFF CACHE BOOL "Use GDCM" ) + SET(USE_GDCM ON CACHE BOOL "Use GDCM" ) SET(USE_GDCM2 OFF CACHE BOOL "Use GDCM2" ) SET(USE_GDCM_VTK ON CACHE BOOL "Use GDCM_VTK" FORCE) SET(${BBTK_PACKAGE_NAME}_LIBS ${${BBTK_PACKAGE_NAME}_LIBS} ${GDCM_LIBRARIES} ) - + IF(USE_GDCM) IF(USE_GDCM2) - message(FATAL_ERROR "we have to choose between DICOM library readers") + message(FATAL_ERROR "You cannot select both GDCM and GDCM2 (DICOM library readers)") ENDIF(USE_GDCM2) ENDIF(USE_GDCM) ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM) +#---------- + IF(${BBTK_PACKAGE_NAME}_USE_GDCM2) SET(USE_GDCM2 ON CACHE BOOL "Use GDCM2" FORCE) SET(USE_GDCM2_VTK ON CACHE BOOL "Use GDCM2_VTK" FORCE) - SET(${BBTK_PACKAGE_NAME}_LIBS - ${${BBTK_PACKAGE_NAME}_LIBS} - ${GDCM2_LIBRARIES} - ) + #For some reasons GDCM_LIBRARY is not defined for gdcm2 in windows + IF(WIN32) + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} + vtkgdcm gdcmIOD gdcmMSFF gdcmexpat gdcmCommon gdcmMEXD gdcmDSED gdcmDICT + gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 socketxx gdcmopenjpeg gdcmcharls + ) + ELSE(WIN32) + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} + ${GDCM_LIBRARY} + ) + ENDIF(WIN32) + + IF(USE_GDCM2) + IF(USE_GDCM) + message(FATAL_ERROR "You cannot select both GDCM and GDCM2 (DICOM library readers)") + ENDIF(USE_GDCM) + ENDIF(USE_GDCM2) ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM2) +#---------- IF(${BBTK_PACKAGE_NAME}_USE_GSMIS) SET(USE_GSMIS ON CACHE BOOL "Use GSMIS" FORCE) @@ -178,7 +246,6 @@ IF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) ENDIF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) - #--------------------------------------------------------------------------- MESSAGE(STATUS "")