X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FCMakeLists.txt;h=66da5850535758bfe3297ece52a6a01bcab87334;hb=1df6806a67c2830467246991a950670c84d82eb5;hp=f34df9c5ba989c46985929664541dd0c7bc1cb2e;hpb=1d6e5bd55ffd44376edf185ce2737d24494ced36;p=gdcm.git diff --git a/gdcmPython/demo/CMakeLists.txt b/gdcmPython/demo/CMakeLists.txt index f34df9c5..66da5850 100644 --- a/gdcmPython/demo/CMakeLists.txt +++ b/gdcmPython/demo/CMakeLists.txt @@ -3,7 +3,7 @@ #----------------------------------------------------------------------------- # DOH! python is not found by default FIND_PROGRAM(PYTHON_EXECUTABLE - NAMES python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python + NAMES python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] @@ -16,9 +16,15 @@ FIND_PROGRAM(PYTHON_EXECUTABLE MARK_AS_ADVANCED(PYTHON_EXECUTABLE) IF(PYTHON_EXECUTABLE) + ADD_TEST(Python-PrintDict ${PYTHON_EXECUTABLE} + ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDict.py + ) ADD_TEST(Python-PrintHeader ${PYTHON_EXECUTABLE} ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintHeader.py ) + ADD_TEST(Python-PrintDicomDir ${PYTHON_EXECUTABLE} + ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDicomDir.py + ) ELSE(PYTHON_EXECUTABLE) MESSAGE(FATAL_ERROR "You requested testing for python, but python was not found") @@ -32,3 +38,35 @@ CONFIGURE_FILE( ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintHeader.py ) +CONFIGURE_FILE( + ${GDCM_SOURCE_DIR}/gdcmPython/demo/PrintDicomDir.py.in + ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDicomDir.py +) + +CONFIGURE_FILE( + ${GDCM_SOURCE_DIR}/gdcmPython/demo/PrintDict.py.in + ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDict.py +) + +#----------------------------------------------------------------------------- +# Same but for VTK +IF(GDCM_VTK) + IF(PYTHON_EXECUTABLE) + ADD_TEST(Python-VTK-Reader ${PYTHON_EXECUTABLE} + ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmReader.py + ) + ADD_TEST(Python-VTK-Writer ${PYTHON_EXECUTABLE} + ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmWriter.py + ) + ENDIF(PYTHON_EXECUTABLE) + + CONFIGURE_FILE( + ${GDCM_SOURCE_DIR}/gdcmPython/demo/vtkGdcmReader.py.in + ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmReader.py + ) + + CONFIGURE_FILE( + ${GDCM_SOURCE_DIR}/gdcmPython/demo/vtkGdcmWriter.py.in + ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmWriter.py + ) +ENDIF(GDCM_VTK)