X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FCMakeLists.txt;h=bf3f5532779998cc76b61d4f2e3c6ca50aa8df37;hb=83d6c83bfcdfa88b7f322286136f802e89d5830c;hp=a149cd245e4452a195dd8cdf3ebca44ebcda798c;hpb=a2fd1ec6997c33fb40dd3295e3c7f630d26af37a;p=gdcm.git diff --git a/vtk/CMakeLists.txt b/vtk/CMakeLists.txt index a149cd24..bf3f5532 100644 --- a/vtk/CMakeLists.txt +++ b/vtk/CMakeLists.txt @@ -1,52 +1,76 @@ -#----------------------------------------------------------------------------- -# VTK GDCM Reader subdir - -#----------------------------------------------------------------------------- -# Need gdcm header files -INCLUDE_DIRECTORIES( - ${GDCM_SOURCE_DIR}/src/ -) - -SET(VTKGDCM_LIB_SRCS - vtkGdcmReader.cxx -) - -#----------------------------------------------------------------------------- -# Create vtkgdcm library -ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS}) -TARGET_LINK_LIBRARIES(vtkgdcm - gdcm - vtkCommon - vtkIO - vtkFiltering -) - -#----------------------------------------------------------------------------- -# See with frog why m4 didn't link to lib, and include cxx file instead ? -SET(vtkgdcmdemo_SOURCES - testvtkGdcmReader.cxx -# vtkGdcmReader.cxx -) -ADD_EXECUTABLE(vtkgdcmdemo ${vtkgdcmdemo_SOURCES}) -TARGET_LINK_LIBRARIES(vtkgdcmdemo - vtkgdcm - vtkGraphics - vtkRendering -) - -#----------------------------------------------------------------------------- -# See with frog why m4 didn't link to lib, and include cxx file instead ? -SET(vtkgdcmViewer_SOURCES - vtkgdcmViewer.cxx - #vtkGdcmReader.cxx -) -ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES}) -TARGET_LINK_LIBRARIES(vtkgdcmViewer - vtkgdcm - vtkRendering -) - -# Install vtk header -INSTALL_FILES(/include FILES vtkGdcmReader.h) - -INSTALL_TARGETS(/lib/ vtkgdcm) +#----------------------------------------------------------------------------- +# VTK GDCM Reader subdir +# Rebuild gdcm whenever a file starting with vtk* is modified +INCLUDE_REGULAR_EXPRESSION("^vtk.*$") + +#----------------------------------------------------------------------------- +# Include the VTK library +INCLUDE(${VTK_USE_FILE}) + +# Need gdcm header files +INCLUDE_DIRECTORIES( + ${GDCM_SOURCE_DIR}/src/ + ${GDCM_BINARY_DIR}/ +) + +SET(VTKGDCM_LIB_SRCS + vtkGdcmReader.cxx + vtkGdcmWriter.cxx +) + +#----------------------------------------------------------------------------- +# Create vtkgdcm library +ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS}) +TARGET_LINK_LIBRARIES(vtkgdcm + gdcm + vtkCommon + vtkIO + vtkFiltering +) + +#----------------------------------------------------------------------------- +SET(vtkgdcmdemo_SOURCES + vtkGdcmDemo.cxx +) +ADD_EXECUTABLE(vtkgdcmdemo ${vtkgdcmdemo_SOURCES}) +TARGET_LINK_LIBRARIES(vtkgdcmdemo + vtkgdcm + vtkGraphics + vtkRendering +) + +#----------------------------------------------------------------------------- +SET(vtkgdcmViewer_SOURCES + vtkgdcmViewer.cxx +) +ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES}) +TARGET_LINK_LIBRARIES(vtkgdcmViewer + vtkgdcm + vtkRendering +) +ADD_EXECUTABLE(vtkgdcmViewer2 vtkgdcmViewer2.cxx) +TARGET_LINK_LIBRARIES(vtkgdcmViewer2 + vtkgdcm + vtkRendering +) + +#----------------------------------------------------------------------------- +SET(vtkWriteDicom_SOURCES + vtkWriteDicom.cxx +) +ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES}) +TARGET_LINK_LIBRARIES(vtkWriteDicom + vtkgdcm + vtkIO + vtkRendering +) + +#----------------------------------------------------------------------------- +# Install vtk header +INSTALL_FILES(/include/gdcm FILES vtkGdcmReader.h) +INSTALL_FILES(/include/gdcm FILES vtkGdcmWriter.h) + +INSTALL_TARGETS(/lib/gdcm/ vtkgdcm) +INSTALL_TARGETS(/bin/ vtkgdcmViewer) +INSTALL_TARGETS(/bin/ vtkgdcmViewer2) +