Oops,

 

this time WITH attachment :)

 

Another hint: In CMake, you can configure DCMTK_imagedb_Library. This
Library does not longer exist in 3.6.1 snapshot. Any ideas? 

 

Torben

 

---

Attached: src\osgPlugins\dicom\CMakeLists.txt

 

 

 

Von: osg-submissions
[mailto:osg-submissions-boun...@lists.openscenegraph.org] Im Auftrag von
Torben Dannhauer
Gesendet: Samstag, 22. Oktober 2016 14:33
An: 'OpenSceneGraph Submissions' <osg-submissions@lists.openscenegraph.org>
Betreff: [osg-submissions] Fix for DICOM plugin (DCMTK) : corrects a linker
error

 

Hi Robert,

 

When compiling OSG with DCMTK on windows, it throws an compiler error due to
a missing ws2_32.lib in the linker settings. 

 

Please find attached the corrected CmakeLists.txt - tested with the latest
DCMTK snapshot.

 

Thanks for merging,

Torben

 

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)

    IF (WIN32)
        SET(TARGET_EXTERNAL_LIBRARIES wsock32.lib ws2_32.lib)
    ENDIF()

ELSEIF(ITK_FOUND)

    INCLUDE(${ITK_USE_FILE})

    SET(TARGET_SRC ReaderWriterDICOM.cpp )

    LINK_LIBRARIES(ITKCommon ITKIO)

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

ENDIF()

SET(TARGET_ADDED_LIBRARIES osgVolume )

IF(CMAKE_COMPILER_IS_GNUCXX)
    # Remove -pedantic flag as it barfs on ffmpeg headers
   STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ENDIF()

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

Reply via email to