1 # Python testing directory, 'demo' is not very explicit ...
3 #-----------------------------------------------------------------------------
4 # DOH! python is not found by default
5 FIND_PROGRAM(PYTHON_EXECUTABLE
6 NAMES python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
8 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
9 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
10 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
11 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]
13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]
14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]
15 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]
17 MARK_AS_ADVANCED(PYTHON_EXECUTABLE)
20 ADD_TEST(Python-PrintDict ${PYTHON_EXECUTABLE}
21 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDict.py
23 ADD_TEST(Python-PrintFile ${PYTHON_EXECUTABLE}
24 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintFile.py
26 ADD_TEST(Python-PrintDicomDir ${PYTHON_EXECUTABLE}
27 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDicomDir.py
29 ADD_TEST(Python-MakeDicomDir ${PYTHON_EXECUTABLE}
30 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDicomDir.py
32 ELSE(PYTHON_EXECUTABLE)
33 MESSAGE(FATAL_ERROR "You requested testing for python, but python was not
35 ENDIF(PYTHON_EXECUTABLE)
37 #-----------------------------------------------------------------------------
38 # Copy all the demo directory content to the cmake bin
39 # Without it, tests can't be launched
41 ${GDCM_SOURCE_DIR}/gdcmPython/demo/gdcmConfigDemo.py.in
42 ${GDCM_BINARY_DIR}/gdcmPython/demo/gdcmConfigDemo.py
46 ${GDCM_SOURCE_DIR}/gdcmPython/demo/PrintFile.py.in
47 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintFile.py
51 ${GDCM_SOURCE_DIR}/gdcmPython/demo/PrintDicomDir.py.in
52 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDicomDir.py
56 ${GDCM_SOURCE_DIR}/gdcmPython/demo/MakeDicomDir.py.in
57 ${GDCM_BINARY_DIR}/gdcmPython/demo/MakeDicomDir.py
61 ${GDCM_SOURCE_DIR}/gdcmPython/demo/PrintDict.py.in
62 ${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDict.py
65 INSTALL_FILES(/lib/gdcm/gdcmPython/demo FILES
66 "${GDCM_BINARY_DIR}/gdcmPython/demo/PrintFile.py"
67 "${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDicomDir.py"
68 "${GDCM_BINARY_DIR}/gdcmPython/demo/PrintDict.py"
71 #-----------------------------------------------------------------------------
75 ADD_TEST(Python-VTK-Reader ${PYTHON_EXECUTABLE}
76 ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmReader.py
78 ADD_TEST(Python-VTK-Writer ${PYTHON_EXECUTABLE}
79 ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmWriter.py
81 ENDIF(PYTHON_EXECUTABLE)
84 ${GDCM_SOURCE_DIR}/gdcmPython/demo/vtkGdcmReader.py.in
85 ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmReader.py
89 ${GDCM_SOURCE_DIR}/gdcmPython/demo/vtkGdcmWriter.py.in
90 ${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmWriter.py
93 INSTALL_FILES(/lib/gdcm/gdcmPython/demo FILES
94 "${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmReader.py"
95 "${GDCM_BINARY_DIR}/gdcmPython/demo/vtkGdcmWriter.py"
100 #-----------------------------------------------------------------------------