]> Creatis software - gdcm.git/blob - gdcmPython/demo/CMakeLists.txt
d6cc435a9a4059ffb9f35462be9dd9198b91a80c
[gdcm.git] / gdcmPython / demo / CMakeLists.txt
1 # Python testing directory, 'demo' is not very explicit ...
2
3 # DOH! python is not found by default
4 FIND_PROGRAM(PYTHON_EXECUTABLE
5     NAMES python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
6     PATHS
7     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
8     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]
9     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]
10     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]
11     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]
12     [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]
13 )
14 MARK_AS_ADVANCED(PYTHON_EXECUTABLE)
15
16 IF(PYTHON_EXECUTABLE)
17   ADD_TEST(PrintHeader-Python ${PYTHON_EXECUTABLE}
18     ${GDCM_SOURCE_DIR}/gdcmPython/demo/PrintHeader.py
19     )
20 ELSE(PYTHON_EXECUTABLE)
21   MESSAGE(FATAL_ERROR "You requested testing for python, but python was not
22     found")
23 ENDIF(PYTHON_EXECUTABLE)