Woops, I just found the submissions guidelines. Here's the full file. Sorry.

Paul

--- On Thu, 2/7/09, Paul Fotheringham <[email protected]> wrote:

> From: Paul Fotheringham <[email protected]>
> Subject: [osg-submissions] dicom plugin Linux build fix when using itk
> To: [email protected]
> Date: Thursday, 2 July, 2009, 1:06 PM
> Hi,
> 
> Recently there was a thread about compile errors for the
> dicom plug-in when it was built against itk and these were
> proven to be a result of aggressive warnings/errors by gcc.
> 
> I just tried to build 2.8.2rc2 and got the same build
> errors myself so I had a quick look at the itk code. It
> seems that all that is required is to define
> VCL_CAN_STATIC_CONST_INIT_FLOAT to be zero.
> 
> I have attached a patch file for the CMakeLists.txt file
> for the dicom plugin. It doesn't test for platform/compiler
> but then setting that define to zero shouldn't be a problem
> on any other platform/compiler AFAIK so may as well be
> consistent.
> 
> Paul Fotheringham.
> 
> PS. My first ever patch so hopefully it works!
> 
> 
> 
>       
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>


      
IF  (DCMTK_FOUND)

    # note, we have to include a '/' in front of the directory string to 
prevent a CMake bug from ignoring the directory
    INCLUDE_DIRECTORIES(/${DCMTK_ROOT_INCLUDE_DIR})

    SET(TARGET_SRC ReaderWriterDICOM.cpp )

    LINK_LIBRARIES(${DCMTK_LIBRARIES} ${ZLIB_LIBRARY})

    ADD_DEFINITIONS(-DUSE_DCMTK)

ELSE(DCMTK_FOUND)

    IF (ITK_FOUND)

    INCLUDE(${ITK_USE_FILE})

    INCLUDE_DIRECTORIES( ITK_INCLUDE_DIRS )

    SET(TARGET_SRC ReaderWriterDICOM.cpp )

    LINK_DIRECTORIES(${ITK_LIBRARY_DIRS})

    # LINK_LIBRARIES(${ITK_LIBRARIES})

    LINK_LIBRARIES(ITKCommon ITKIO)

    ADD_DEFINITIONS(-DUSE_ITK)
    ADD_DEFINITIONS(-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0)

    ENDIF(ITK_FOUND)

ENDIF(DCMTK_FOUND)

SET(TARGET_ADDED_LIBRARIES osgVolume )

#### end var setup  ###
SETUP_PLUGIN(dicom dicom)
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to