2 #If we reach this dir we have selected this option
6 #http://www.cmake.org/pipermail/cmake/2003-August/004185.html
7 #http://www.cmake.org/pipermail/cmake/2003-January/001092.html
11 ${GDCM_SOURCE_DIR}/src
12 ${PYTHON_INCLUDE_PATH}
16 ${GDCM_SOURCE_DIR}/src
25 ADD_CUSTOM_TARGET(mathieu ALL)
27 SET(GDCM_PYTHON_SOURCES
31 SET_SOURCE_FILES_PROPERTIES(gdcm_wrap.cxx GENERATED)
33 ADD_LIBRARY(pygdcm ${GDCM_PYTHON_SOURCES})
34 TARGET_LINK_LIBRARIES(pygdcm
39 #-----------------------------------------------------------------------------
40 # As of 09/10/2003 there was no FindSWIG.cmake
41 # later we should use SWIG instead of swig
42 # Build our custom command :
44 SOURCE ${GDCM_SOURCE_DIR}/gdcmPython/gdcm.i
46 ARGS -python -c++ -I${GDCM_SOURCE_DIR}/src -o
47 ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx
48 ${GDCM_SOURCE_DIR}/gdcmPython/gdcm.i
50 OUTPUTS ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx
58 ${GDCM_SOURCE_DIR}/vtk
61 SET(vtkgdcmPython_la_SOURCES
62 # vtkGdcmReaderPython.cxx
64 ${GDCM_SOURCE_DIR}/vtk/vtkGdcmReader.cxx
66 SET_SOURCE_FILES_PROPERTIES(vtkGdcmReaderPython.cxx GENERATED)
69 # The C++ files must be made into a C++ library
70 #ADD_LIBRARY ( vtkgdcmPython ${vtkgdcmPython_la_SOURCES})
72 # set the libraries to link against
73 #TARGET_LINK_LIBRARIES(vtkgdcmPython vtkCommon)
75 # Configure Python module, which is the plugin itself
77 VTK_WRAP_PYTHON2(vtkgdcmPython gdcmfoo
78 ${vtkgdcmPython_la_SOURCES})
79 ADD_LIBRARY(vtkgdcmPython SHARED ${gdcmfoo})
80 TARGET_LINK_LIBRARIES (vtkgdcmPython
85 ENDIF (GDCM_WRAP_PYTHON)
88 #I should install in path of PYTHON_LIBRARY
89 GET_FILENAME_COMPONENT(PYTHON_LIB_INSTALL ${PYTHON_LIBRARY} PATH)
90 GET_FILENAME_COMPONENT(SITEPACKAGE ${PYTHON_LIB_INSTALL}/../site-packages ABSOLUTE)
91 MESSAGE(STATUS ${SITEPACKAGE})
92 #INSTALL_FILES(/include "\\.h$")
93 #INSTALL_TARGETS(/lib/ gdcm)