Show
Ignore:
Timestamp:
11/09/10 15:57:20 (3 years ago)
Author:
robert
Message:

From Wang Rui, "I'm now testing static building of OSG and found a possible bug in the
present3D application. As static-link present3d should depend on
freetype, png, pdf and some other plugins, any mis-compiling of these
plugins will make present3d fail to be built. Some lirbaries like
poppler and cairo are not popular under Windows, so it is very common
that we don't have osgdb_pdf compiled and thus get errors when
building present3d. I've modified the CMakeLists and present3d.cpp to
avoid this problem."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/applications/present3D/CMakeLists.txt

    r11401 r11905  
    5151            osgdb_osg 
    5252            osgdb_p3d 
    53  
    54             osgdb_freetype 
    55             osgdb_pdf 
    5653            osgdb_rgb 
    57             osgdb_jpeg 
    58             osgdb_png 
    59  
    60             osgdb_ffmpeg 
    61  
    6254            osgdb_openflight 
    6355            osgdb_obj 
     56    ) 
    6457 
    65             osgdb_curl 
    66     ) 
     58    IF(JPEG_FOUND) 
     59        ADD_DEFINITIONS(-DUSE_JPEG) 
     60        SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_jpeg) 
     61    ENDIF(JPEG_FOUND) 
     62 
     63    IF(PNG_FOUND) 
     64        ADD_DEFINITIONS(-DUSE_PNG) 
     65        SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_png) 
     66    ENDIF(PNG_FOUND) 
     67 
     68    IF(CURL_FOUND) 
     69        ADD_DEFINITIONS(-DUSE_CURL) 
     70        SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_curl) 
     71    ENDIF(CURL_FOUND) 
     72 
     73    IF(FFMPEG_FOUND) 
     74        ADD_DEFINITIONS(-DUSE_FFMPEG) 
     75        SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_ffmpeg) 
     76    ENDIF(FFMPEG_FOUND) 
     77 
     78    IF(FREETYPE_FOUND) 
     79        ADD_DEFINITIONS(-DUSE_FREETYPE) 
     80        SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_freetype) 
     81    ENDIF(FREETYPE_FOUND) 
     82 
     83    IF(POPPLER_FOUND AND CAIRO_FOUND) 
     84        ADD_DEFINITIONS(-DUSE_POPPLER_CAIRO) 
     85        SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_pdf) 
     86    ENDIF(POPPLER_FOUND AND CAIRO_FOUND) 
    6787ENDIF() 
    6888