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."
This commit is contained in:
parent
3fb3ef9f39
commit
057e109aa0
@ -50,20 +50,40 @@ IF (NOT DYNAMIC_OPENSCENEGRAPH)
|
|||||||
osgdb_ive
|
osgdb_ive
|
||||||
osgdb_osg
|
osgdb_osg
|
||||||
osgdb_p3d
|
osgdb_p3d
|
||||||
|
|
||||||
osgdb_freetype
|
|
||||||
osgdb_pdf
|
|
||||||
osgdb_rgb
|
osgdb_rgb
|
||||||
osgdb_jpeg
|
|
||||||
osgdb_png
|
|
||||||
|
|
||||||
osgdb_ffmpeg
|
|
||||||
|
|
||||||
osgdb_openflight
|
osgdb_openflight
|
||||||
osgdb_obj
|
osgdb_obj
|
||||||
|
|
||||||
osgdb_curl
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(JPEG_FOUND)
|
||||||
|
ADD_DEFINITIONS(-DUSE_JPEG)
|
||||||
|
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_jpeg)
|
||||||
|
ENDIF(JPEG_FOUND)
|
||||||
|
|
||||||
|
IF(PNG_FOUND)
|
||||||
|
ADD_DEFINITIONS(-DUSE_PNG)
|
||||||
|
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_png)
|
||||||
|
ENDIF(PNG_FOUND)
|
||||||
|
|
||||||
|
IF(CURL_FOUND)
|
||||||
|
ADD_DEFINITIONS(-DUSE_CURL)
|
||||||
|
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_curl)
|
||||||
|
ENDIF(CURL_FOUND)
|
||||||
|
|
||||||
|
IF(FFMPEG_FOUND)
|
||||||
|
ADD_DEFINITIONS(-DUSE_FFMPEG)
|
||||||
|
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_ffmpeg)
|
||||||
|
ENDIF(FFMPEG_FOUND)
|
||||||
|
|
||||||
|
IF(FREETYPE_FOUND)
|
||||||
|
ADD_DEFINITIONS(-DUSE_FREETYPE)
|
||||||
|
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_freetype)
|
||||||
|
ENDIF(FREETYPE_FOUND)
|
||||||
|
|
||||||
|
IF(POPPLER_FOUND AND CAIRO_FOUND)
|
||||||
|
ADD_DEFINITIONS(-DUSE_POPPLER_CAIRO)
|
||||||
|
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_pdf)
|
||||||
|
ENDIF(POPPLER_FOUND AND CAIRO_FOUND)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
|
@ -56,27 +56,40 @@
|
|||||||
#include "SDLIntegration.h"
|
#include "SDLIntegration.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OSG_LIBRARY_STATIC
|
#ifdef OSG_LIBRARY_STATIC
|
||||||
|
|
||||||
// include the plugins we need
|
// include the plugins we need
|
||||||
USE_OSGPLUGIN(ive)
|
USE_OSGPLUGIN(ive)
|
||||||
USE_OSGPLUGIN(osg)
|
USE_OSGPLUGIN(osg)
|
||||||
USE_OSGPLUGIN(p3d)
|
USE_OSGPLUGIN(p3d)
|
||||||
USE_OSGPLUGIN(paths)
|
USE_OSGPLUGIN(paths)
|
||||||
|
|
||||||
USE_OSGPLUGIN(freetype)
|
|
||||||
USE_OSGPLUGIN(rgb)
|
USE_OSGPLUGIN(rgb)
|
||||||
USE_OSGPLUGIN(png)
|
|
||||||
USE_OSGPLUGIN(jpeg)
|
|
||||||
|
|
||||||
USE_OSGPLUGIN(ffmpeg)
|
|
||||||
USE_OSGPLUGIN(pdf)
|
|
||||||
|
|
||||||
USE_OSGPLUGIN(OpenFlight)
|
USE_OSGPLUGIN(OpenFlight)
|
||||||
USE_OSGPLUGIN(obj)
|
USE_OSGPLUGIN(obj)
|
||||||
|
|
||||||
USE_OSGPLUGIN(curl)
|
#ifdef USE_FREETYPE
|
||||||
|
USE_OSGPLUGIN(freetype)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_PNG
|
||||||
|
USE_OSGPLUGIN(png)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_JPEG
|
||||||
|
USE_OSGPLUGIN(jpeg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_FFMPEG
|
||||||
|
USE_OSGPLUGIN(ffmpeg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_POPPLER_CAIRO
|
||||||
|
USE_OSGPLUGIN(pdf)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_CURL
|
||||||
|
USE_OSGPLUGIN(curl)
|
||||||
|
#endif
|
||||||
|
|
||||||
// include the platform specific GraphicsWindow implementation.
|
// include the platform specific GraphicsWindow implementation.
|
||||||
USE_GRAPHICSWINDOW()
|
USE_GRAPHICSWINDOW()
|
||||||
|
Loading…
Reference in New Issue
Block a user