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
24 ADD_CUSTOM_TARGET(mathieu ALL)
26 SET(GDCM_PYTHON_SOURCES
30 SET_SOURCE_FILES_PROPERTIES(gdcm_wrap.cxx GENERATED)
32 ADD_LIBRARY(pygdcm ${GDCM_PYTHON_SOURCES})
33 #http://www.cmake.org/pipermail/cmake/2003-August/004190.html
34 #SET_TARGET_PROPERTIES(pygdcm PROPERTIES PREFIX "")
35 TARGET_LINK_LIBRARIES(pygdcm
40 #-----------------------------------------------------------------------------
41 # As of 09/10/2003 there was no FindSWIG.cmake
42 # later we should use SWIG instead of swig
43 # Build our custom command :
45 SOURCE ${GDCM_SOURCE_DIR}/gdcmPython/gdcm.i
47 ARGS -python -c++ -I${GDCM_SOURCE_DIR}/src -o
48 ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx
49 ${GDCM_SOURCE_DIR}/gdcmPython/gdcm.i
51 OUTPUTS ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx
56 ${GDCM_SOURCE_DIR}/vtk
59 SET(vtkgdcmPython_la_SOURCES
60 ${GDCM_SOURCE_DIR}/vtk/vtkGdcmReader.cxx
62 SET_SOURCE_FILES_PROPERTIES(vtkGdcmReaderPython.cxx GENERATED)
64 # The C++ files must be made into a C++ library
65 #ADD_LIBRARY ( vtkgdcmPython ${vtkgdcmPython_la_SOURCES})
67 # set the libraries to link against
68 #TARGET_LINK_LIBRARIES(vtkgdcmPython vtkCommon)
70 # Configure Python module, which is the plugin itself
72 VTK_WRAP_PYTHON2(vtkgdcmPython gdcmfoo
73 ${vtkgdcmPython_la_SOURCES})
74 ADD_LIBRARY(vtkgdcmPython SHARED ${gdcmfoo})
75 TARGET_LINK_LIBRARIES (vtkgdcmPython
80 ENDIF (GDCM_WRAP_PYTHON)
83 #I should install in path of PYTHON_LIBRARY
84 #GET_FILENAME_COMPONENT(PYTHON_LIB_INSTALL ${PYTHON_LIBRARY} PATH)
85 #GET_FILENAME_COMPONENT(SITEPACKAGE ${PYTHON_LIB_INSTALL}/../site-packages ABSOLUTE)
86 #MESSAGE(STATUS ${SITEPACKAGE})
87 #INSTALL_FILES(/include "\\.h$")
88 #INSTALL_TARGETS(/lib/ gdcm)
90 # When installing swig-generated python module one should pay attention
91 # to library naming convention, see here for more detail:
92 # http://www.swig.org/Doc1.3/Python.html#n6
93 # even with the $swig -module mylib, there is always a trailing underscore added