X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fcmake%2FBBTKFindLibraries.cmake;h=21d8599efa703b2993b885ca72c00b90cb05da26;hb=1ae35ab233d889137ae2e0a347f55b960ab4b855;hp=a4e3dcb09c466634c5ed260090be7dd71a8896e4;hpb=c62c89ec6fa2c0a82d6e66d30ca4c11f4bb09366;p=bbtk.git diff --git a/kernel/cmake/BBTKFindLibraries.cmake b/kernel/cmake/BBTKFindLibraries.cmake index a4e3dcb..21d8599 100644 --- a/kernel/cmake/BBTKFindLibraries.cmake +++ b/kernel/cmake/BBTKFindLibraries.cmake @@ -1,3 +1,5 @@ + + #----------------------------------------------------------------------------- #OPTION(USE_VTK "Build VTK-based black boxes" OFF) IF(USE_VTK) @@ -5,7 +7,9 @@ IF(USE_VTK) FIND_PACKAGE(VTK) # If vtk found IF(VTK_FOUND) - MESSAGE ( STATUS "VTK FOUND - VERSION = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}") + MESSAGE ( STATUS "Looking for VTK... found") + MESSAGE ( STATUS "* Dir = ${VTK_DIR}") + MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}") INCLUDE(${VTK_USE_FILE}) ADD_DEF( _USE_VTK_ ) SET(BBTK_VTK_LIBRARIES @@ -29,7 +33,9 @@ IF(USE_ITK) FIND_PACKAGE(ITK) # If itk found IF(ITK_FOUND) - MESSAGE ( STATUS "ITK FOUND - VERSION = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}") + MESSAGE ( STATUS "Looking for ITK... found") + MESSAGE ( STATUS "* Dir = ${ITK_DIR}") + MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}") INCLUDE(${ITK_USE_FILE}) ADD_DEF( _USE_ITK_ ) SET(BBTK_ITK_LIBRARIES @@ -98,6 +104,7 @@ IF(USE_ITK) ENDIF(USE_ITK) #----------------------------------------------------------------------------- + #----------------------------------------------------------------------------- #OPTION(USE_GDCM "Build GDCM-based black boxes" OFF) IF(USE_GDCM) @@ -107,21 +114,38 @@ IF(USE_GDCM) IF(GDCM_FOUND) INCLUDE(${GDCM_USE_FILE}) ADD_DEF( _USE_GDCM_ ) + + MESSAGE ( STATUS "Looking for GDCM... found") + MESSAGE ( STATUS "* Dir = ${GDCM_DIR}") + MESSAGE ( STATUS "* Version = ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}") + MESSAGE ( STATUS "* Namespace = ${GDCM_NAME_SPACE}") + + # Test that GDCM_NAME_SPACE is **NOT** "gdcm" or will conflict with + # embedded gdcm in ITK and will result in hard seg faults ! + IF (GDCM_NAME_SPACE STREQUAL "gdcm") + MESSAGE(FATAL_ERROR "GDCM_NAME_SPACE value is 'gdcm' which conflicts with ITK embededd gdcm namespace : rebuild gdcm with another GDCM_NAME_SPACE value") + ENDIF (GDCM_NAME_SPACE STREQUAL "gdcm") + + MARK_AS_ADVANCED(GDCM_DIR) SET(BBTK_GDCM_LIBRARIES # TO DO : USE GDCM LINK LIBRARIES !!! - gdcm gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 +# IF gdcm WAS NOT COMPILE WITH VTK THE ABOVE FORCED LINK WITH vtkgdcm DOES NOT WORK + ${GDCM_LIBRARIES} +#gdcm gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 ) - IF(USE_VTK ) - SET(BBTK_GDCM_LIBRARIES - ${BBTK_GDCM_LIBRARIES} - vtkgdcm - ) - ENDIF(USE_VTK) + +# IF(USE_VTK ) +# SET(BBTK_GDCM_LIBRARIES +# ${BBTK_GDCM_LIBRARIES} +# vtkgdcm +# ) +# ENDIF(USE_VTK) ENDIF(GDCM_FOUND) ENDIF(USE_GDCM) + #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- @@ -138,11 +162,11 @@ ENDIF(USE_WXWIDGETS) IF(USE_DOXYGEN) FIND_PACKAGE(Doxygen REQUIRED) # MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN}") - # IF(DOXYGEN) -# -# ELSE(DOXYGEN) -# MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation") -# ENDIF(DOXYGEN) + IF(DOXYGEN) + + ELSE(DOXYGEN) + MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation") + ENDIF(DOXYGEN) ENDIF(USE_DOXYGEN) #----------------------------------------------------------------------------- @@ -166,7 +190,6 @@ IF(USE_TTH) ENDIF(USE_TTH) #----------------------------------------------------------------------------- - #----------------------------------------------------------------------------- IF(USE_BOOST) IF(BBTK_USE_SHIPPED_BOOST)