X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FCMakeLists.txt;h=72d0a74b25c4f0e612fd6a76a502d38b1cb3d71a;hb=5ae9aa5467bc943c2545ed669aa616e2c93f5a24;hp=9a6f916393e05b1c5eabdbe4090ab200d3a7d112;hpb=7350639601914cd8ab02bfb0d6668c5bf56ce2f4;p=gdcm.git diff --git a/vtk/CMakeLists.txt b/vtk/CMakeLists.txt index 9a6f9163..72d0a74b 100644 --- a/vtk/CMakeLists.txt +++ b/vtk/CMakeLists.txt @@ -1,5 +1,7 @@ #----------------------------------------------------------------------------- # VTK GDCM Reader subdir +# Rebuild gdcm whenever a file starting with vtk* is modified +INCLUDE_REGULAR_EXPRESSION("^vtk.*$") #----------------------------------------------------------------------------- # Include the VTK library @@ -41,39 +43,53 @@ TARGET_LINK_LIBRARIES(vtkgdcmdemo SET(vtkgdcmViewer_SOURCES vtkgdcmViewer.cxx ) -ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES}) + +# let's do some APPLE/WIN32 magic here +#IF(WIN32) +# SET(GUI_EXECUTABLE WIN32) +#ENDIF(WIN32) +IF(APPLE) + IF(VTK_USE_CARBON) + SET(GUI_EXECUTABLE MACOSX_BUNDLE) + ENDIF(VTK_USE_CARBON) + IF(VTK_USE_COCOA) + SET(GUI_EXECUTABLE MACOSX_BUNDLE) + ENDIF(VTK_USE_COCOA) + # when using X11 on Apple you don't need this... +ENDIF(APPLE) + +ADD_EXECUTABLE(vtkgdcmViewer ${GUI_EXECUTABLE} ${vtkgdcmViewer_SOURCES}) TARGET_LINK_LIBRARIES(vtkgdcmViewer vtkgdcm vtkRendering ) - -#----------------------------------------------------------------------------- -SET(vtkWriteDicom_SOURCES - vtkWriteDicom.cxx +ADD_EXECUTABLE(vtkgdcmViewer2 ${GUI_EXECUTABLE} vtkgdcmViewer2.cxx) +TARGET_LINK_LIBRARIES(vtkgdcmViewer2 + vtkgdcm + vtkRendering ) -ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES}) -TARGET_LINK_LIBRARIES(vtkWriteDicom +ADD_EXECUTABLE(vtkgdcmSerieViewer ${GUI_EXECUTABLE} vtkgdcmSerieViewer.cxx) +TARGET_LINK_LIBRARIES(vtkgdcmSerieViewer vtkgdcm - vtkIO vtkRendering ) - #----------------------------------------------------------------------------- -SET(GdcmToBaseline_SOURCES - GdcmToBaseline.cxx +SET(vtkWriteDicom_SOURCES + vtkWriteDicom.cxx ) -ADD_EXECUTABLE(GdcmToBaseline ${GdcmToBaseline_SOURCES}) -TARGET_LINK_LIBRARIES(GdcmToBaseline +ADD_EXECUTABLE(vtkWriteDicom ${vtkWriteDicom_SOURCES}) +TARGET_LINK_LIBRARIES(vtkWriteDicom vtkgdcm vtkIO - vtkImaging vtkRendering ) #----------------------------------------------------------------------------- # Install vtk header -INSTALL_FILES(/include FILES vtkGdcmReader.h) -INSTALL_FILES(/include FILES vtkGdcmWriter.h) - -INSTALL_TARGETS(/lib/ vtkgdcm) +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) +INSTALL_TARGETS(/bin/ vtkgdcmSerieViewer)