]> Creatis software - gdcm.git/commitdiff
*ENH/ Update CMakeLists.txt
authormalaterre <malaterre>
Thu, 13 Nov 2003 11:27:22 +0000 (11:27 +0000)
committermalaterre <malaterre>
Thu, 13 Nov 2003 11:27:22 +0000 (11:27 +0000)
CMakeLists.txt
gdcmPython/CMakeLists.txt
gdcmPython/setup.py.in

index 9c3cc1366fd218331ac435c1ca6354284f53c409..24314973602fc5a90043e2228ccd95da0740bd23 100644 (file)
@@ -20,6 +20,12 @@ MARK_AS_ADVANCED(GDCM_DATA_DIR)
 OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON)\r
 SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})\r
 \r
+SET(CMAKE_CONFIGURATION_TYPES\r
+  Debug\r
+  Release\r
+)\r
+SET(CMAKE_BUILD_TYPE_INIT Debug)\r
+\r
 #-----------------------------------------------------------------------------\r
 # Output directories.\r
 #Put all stuff in one single dir for Win32, otherwise dll are a pain:\r
index c8cb8da3f01dcc323f7ec6adaeda47c881c8d73f..999d02094faf09fbac0dc49519c8f51960d09221 100644 (file)
@@ -1,11 +1,9 @@
 #IF(GDCM_WRAP_PYTHON)
 #If we reach this dir we have selected this option
 
-
-#TODO
-#http://www.cmake.org/pipermail/cmake/2003-August/004185.html
-#http://www.cmake.org/pipermail/cmake/2003-January/001092.html
-
+# TODO
+# http://www.cmake.org/pipermail/cmake/2003-August/004185.html
+# http://www.cmake.org/pipermail/cmake/2003-January/001092.html
 
 INCLUDE_DIRECTORIES(
   ${GDCM_SOURCE_DIR}/src
@@ -21,7 +19,7 @@ SET(SWIG_INC
   ${GDCM_INC}
 )
 
-ADD_CUSTOM_TARGET(mathieu ALL)
+#ADD_CUSTOM_TARGET(mathieu ALL)
 
 SET(GDCM_PYTHON_SOURCES
   gdcm_wrap.cxx
@@ -30,8 +28,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 "")
+# http://www.cmake.org/pipermail/cmake/2003-August/004190.html
+# SET_TARGET_PROPERTIES(pygdcm PROPERTIES PREFIX "_")
 TARGET_LINK_LIBRARIES(pygdcm 
   ${PYTHON_LIBRARY}
   gdcm
@@ -61,17 +59,13 @@ IF(GDCM_VTK)
   )
   SET_SOURCE_FILES_PROPERTIES(vtkGdcmReaderPython.cxx GENERATED)
   
-  # The C++ files must be made into a C++ library
-  #ADD_LIBRARY ( vtkgdcmPython ${vtkgdcmPython_la_SOURCES})
-
-  # set the libraries to link against
-  #TARGET_LINK_LIBRARIES(vtkgdcmPython vtkCommon)
-
   # Configure Python module, which is the plugin itself
   IF (GDCM_WRAP_PYTHON)
     VTK_WRAP_PYTHON2(vtkgdcmPython gdcmfoo
                    ${vtkgdcmPython_la_SOURCES})
+    # The C++ files must be made into a C++ library
     ADD_LIBRARY(vtkgdcmPython SHARED ${gdcmfoo})
+    # set the libraries to link against
     TARGET_LINK_LIBRARIES (vtkgdcmPython
                          pygdcm
                          vtkgdcm
@@ -95,6 +89,8 @@ ENDIF(GDCM_VTK)
 #INSTALL_FILES(/include "\\.h$")
 #INSTALL_TARGETS(/lib/ gdcm)
 
+INSTALL_TARGETS(/lib/ "gdcm.py")
+
 # 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
index e5e2988002fbb140d3fe42e80edfaf25672c72ea..3a8d31c8c304cc15cc0c7073b8646904b07aa675 100644 (file)
@@ -4,7 +4,7 @@ from distutilsWrapping import *
 from WrapSwig import *
 from WrapVTK import *
 
-ThisModule='gdcmPython'
+ThisModule      ="gdcmPython"
 gdcmPythonSrcDir=ThisModule
 gdcmSrcDir      ="src"
 gdcmJpeg8SrcDir =os.path.join('src', 'jpeg', 'libijg8')
@@ -81,8 +81,8 @@ Sources.extend(JpgSources)
 VTK_INCLUDE_DIR=os.path.join(VTKPATH,"include","vtk")
 VTK_LIB_DIR=os.path.join(VTKPATH,"lib","vtk")
 vtkSources = []
-vtkSources.extend(glob.glob(os.path.join(gdcmvtkSrcDir,"vtk*.cxx")))
-vtkSources.extend(glob.glob(os.path.join(gdcmSrcDir,"*.cxx")))
+vtkSources.extend(glob.glob(os.path.join(gdcmvtkSrcDir,'vtk*.cxx')))
+vtkSources.extend(glob.glob(os.path.join(gdcmSrcDir,'*.cxx')))
 vtkSources.extend(Jpeg8Sources)
 vtkSources.extend(Jpeg12Sources)
 vtkSources.extend(JpgSources)