I think I have this done. Please find attached a patch for the root CMakeLists.txt and a tarball with all the .pc.in files to be deployed in the OpenSceneGraph/packaging/pkgconfig directory.
Regards, Alberto
--- CMakeLists.txt~ 2009-02-12 11:17:41.000000000 +0100 +++ CMakeLists.txt 2009-05-12 17:35:50.000000000 +0200 @@ -770,14 +770,35 @@ ENDIF(BUILD_OSG_PACKAGES) ENDIF(CMAKE_CPACK_COMMAND) -# Generate pkg-config configuration file +# Generate pkg-config configuration files -CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/openscenegraph.pc.in - ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc +SET(PKGCONFIG_FILES + openscenegraph + openscenegraph-db + openscenegraph-fx + openscenegraph-ga + openscenegraph-particle + openscenegraph-sim + openscenegraph-text + openscenegraph-util + openscenegraph-terrain + openscenegraph-manipulator + openscenegraph-viewer + openscenegraph-widget + openscenegraph-shadow + openscenegraph-animation + openscenegraph-volume + openscenegraph-introspection +) + +FOREACH(PKGCONFIG_FILE ${PKGCONFIG_FILES}) + CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc.in + ${PROJECT_BINARY_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc @ONLY ) + INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig COMPONENT libopenscenegraph-dev) +ENDFOREACH(PKGCONFIG_FILE) -INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig COMPONENT libopenscenegraph-dev) # Run this as late as possible so users can easier spot the message IF (${CMAKE_INSTALL_PREFIX} STREQUAL "/usr/local")
pkgconfig_templates.tar.gz
Description: application/tgz