Hi Wang Rui, As an interim step I've moved out the pkg-config dependent library checks into three separate CMakeModule/Find*.cmake files : FindPoppler-glib.cmake, FindRSVG.cmake and FindGtkGl.cmake, each one of these is still dependent on pkg-config, but this potentially could be expanded with a non pkg-config implementation for each one of them.
I have tested under my problem Kubuntu 10.10 system where poppler-glib-dev was installed and reported OK by the CMake pkg-config test, but wasn't working correctly because I hadn't installed gtk dev headers. The new FindPoppler-lib is able to detect this problem and disable the FOUND_POPPLER env var. It also correctly allows things to work again once all the necessary dependencies are pulled in. With these change I've also added in support for disabling RSVG and POPPLER when FOUND_CAIRO is false, which in terms means that the plugins and Present3D CMakeLists.cmake needn't have the extra FOUND_CAIRO check. Perhaps these new Cmake Find modules will make it easier for you to specialize them. An svn update will get these changes. Cheers, Robert. On Thu, Nov 11, 2010 at 3:44 PM, Wang Rui <[email protected]> wrote: > Hi Robert, > > My external script shows that to built osgdb_pdf, we will require the > following dependencies (if all configured to static): > > expat (for fontconfig), zlib, freetype, libpng, fontconfig, cairo, > pixman, glib, libpoppler and poppler-glib > > Linking with dynamic libraries should be easier but still full of > pains. Maybe we have to create a FindGTKToolchain module first for > configuring this and the svg and gtk supports. I'll have a look at > this in the following few days, but at present, we may simply set > POPPLER_FOUND to FALSE if the script test fails before building the > osgdb_pdf plugin. > > Cheers, > > Wang Rui > > > 2010/11/11 Robert Osfield <[email protected]>: >> Hi Wang Rui, >> >> I was hoping that it'd be quite straight forward to set up the >> required FindPopper-glib.cmake but my inititial attempt resulted in >> finding poppler headers but the poppller headers themselves failing >> due to a dependency on gtk headers. I've rebooting into my older >> system and tested pkg-config for poppler and got: >> >>> pkg-config poppler-glib --cflags >> -D_REENTRANT -I/usr/include/poppler/glib -I/usr/include/poppler >> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo >> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include >> -I/usr/include/pango-1.0 -I/usr/include/pixman-1 >> -I/usr/include/freetype2 -I/usr/include/directfb >> -I/usr/include/libpng12 >> >>> pkg-config poppler-glib --libs >> -lpoppler-glib -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 >> -lgio-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 >> >> Which is no ordinary list of includes and dependencies. This makes me >> rather discouraged about the potential of going with our own find >> scripts. >> >> Robert. >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >> > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
