X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FCMakeLists.txt;h=41023aa2427aaa8895589e59c798efbe0bd06be3;hb=156cc35489affb730a6aa95409e46e3610977086;hp=11e7e18b85e4e006c090190b464094d408aba117;hpb=48f74f488893c3b7dbc5cd7c72ccf25947049ca5;p=gdcm.git diff --git a/vtk/CMakeLists.txt b/vtk/CMakeLists.txt index 11e7e18b..41023aa2 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,11 +43,31 @@ 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 ) +ADD_EXECUTABLE(vtkgdcmViewer2 ${GUI_EXECUTABLE} vtkgdcmViewer2.cxx) +TARGET_LINK_LIBRARIES(vtkgdcmViewer2 + vtkgdcm + vtkRendering +) #----------------------------------------------------------------------------- SET(vtkWriteDicom_SOURCES @@ -60,8 +82,10 @@ TARGET_LINK_LIBRARIES(vtkWriteDicom #----------------------------------------------------------------------------- # Install vtk header -INSTALL_FILES(/include FILES vtkGdcmReader.h) -INSTALL_FILES(/include FILES vtkGdcmWriter.h) +INSTALL_FILES(/include/gdcm FILES vtkGdcmReader.h) +INSTALL_FILES(/include/gdcm FILES vtkGdcmWriter.h) -INSTALL_TARGETS(/lib/ vtkgdcm) +INSTALL_TARGETS(/lib/gdcm/ vtkgdcm) +INSTALL_TARGETS(/bin/ vtkgdcmViewer) +INSTALL_TARGETS(/bin/ vtkgdcmViewer2)