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 #http://www.cmake.org/pipermail/cmake/2003-August/004190.html
35 SET_TARGET_PROPERTIES(pygdcm PROPERTIES PREFIX "")
36 TARGET_LINK_LIBRARIES(pygdcm
41 #-----------------------------------------------------------------------------
42 # As of 09/10/2003 there was no FindSWIG.cmake
43 # later we should use SWIG instead of swig
44 # Build our custom command :
46 SOURCE ${GDCM_SOURCE_DIR}/gdcmPython/gdcm.i
48 ARGS -python -c++ -I${GDCM_SOURCE_DIR}/src -o
49 ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx
50 ${GDCM_SOURCE_DIR}/gdcmPython/gdcm.i
52 OUTPUTS ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx
60 ${GDCM_SOURCE_DIR}/vtk
63 SET(vtkgdcmPython_la_SOURCES
64 # vtkGdcmReaderPython.cxx
66 ${GDCM_SOURCE_DIR}/vtk/vtkGdcmReader.cxx
68 SET_SOURCE_FILES_PROPERTIES(vtkGdcmReaderPython.cxx GENERATED)
71 # The C++ files must be made into a C++ library
72 #ADD_LIBRARY ( vtkgdcmPython ${vtkgdcmPython_la_SOURCES})
74 # set the libraries to link against
75 #TARGET_LINK_LIBRARIES(vtkgdcmPython vtkCommon)
77 # Configure Python module, which is the plugin itself
79 VTK_WRAP_PYTHON2(vtkgdcmPython gdcmfoo
80 ${vtkgdcmPython_la_SOURCES})
81 ADD_LIBRARY(vtkgdcmPython SHARED ${gdcmfoo})
82 TARGET_LINK_LIBRARIES (vtkgdcmPython
87 ENDIF (GDCM_WRAP_PYTHON)
90 #I should install in path of PYTHON_LIBRARY
91 GET_FILENAME_COMPONENT(PYTHON_LIB_INSTALL ${PYTHON_LIBRARY} PATH)
92 GET_FILENAME_COMPONENT(SITEPACKAGE ${PYTHON_LIB_INSTALL}/../site-packages ABSOLUTE)
93 MESSAGE(STATUS ${SITEPACKAGE})
94 #INSTALL_FILES(/include "\\.h$")
95 #INSTALL_TARGETS(/lib/ gdcm)
97 # When installing swig-generated python module one should pay attention
98 # to library naming convention, see here for more detail:
99 # http://www.swig.org/Doc1.3/Python.html#n6
100 # even with the $swig -module mylib, there is always a trailing underscore added