X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2FCMakeLists.txt;h=a6e8adc8641e251c5e4ecab095fbdcfd2eb5bf28;hb=6ad8bd600f9e09d880ef4cc47312b8dad68e6004;hp=0c8ed539bee2dca564c8711aeeb4efe99026d44a;hpb=eb46f178c8cd7efca6bc149bcd95c41a4a3704f2;p=gdcm.git diff --git a/gdcmPython/CMakeLists.txt b/gdcmPython/CMakeLists.txt index 0c8ed539..a6e8adc8 100644 --- a/gdcmPython/CMakeLists.txt +++ b/gdcmPython/CMakeLists.txt @@ -31,6 +31,8 @@ SET(GDCM_PYTHON_SOURCES SET_SOURCE_FILES_PROPERTIES(gdcm_wrap.cxx GENERATED) ADD_LIBRARY(pygdcm ${GDCM_PYTHON_SOURCES}) +#http://www.cmake.org/pipermail/cmake/2003-August/004190.html +SET_TARGET_PROPERTIES(pygdcm PROPERTIES PREFIX "") TARGET_LINK_LIBRARIES(pygdcm ${PYTHON_LIBRARY} gdcm @@ -84,3 +86,15 @@ IF(GDCM_VTK) vtkIOPython) ENDIF (GDCM_WRAP_PYTHON) ENDIF(GDCM_VTK) + +#I should install in path of PYTHON_LIBRARY +GET_FILENAME_COMPONENT(PYTHON_LIB_INSTALL ${PYTHON_LIBRARY} PATH) +GET_FILENAME_COMPONENT(SITEPACKAGE ${PYTHON_LIB_INSTALL}/../site-packages ABSOLUTE) +MESSAGE(STATUS ${SITEPACKAGE}) +#INSTALL_FILES(/include "\\.h$") +#INSTALL_TARGETS(/lib/ gdcm) + +# When installing swig-generated python module one should pay attention +# to library naming convention, see here for more detail: +# http://www.swig.org/Doc1.3/Python.html#n6 +# even with the $swig -module mylib, there is always a trailing underscore added