From Alberto Luaces, "I have modified CMakeLists.txt in order to make CMake fill the existent

openscenegraph.pc and openthreads.pc files with OSG's installation values.
Then I install those files into the expected path for pkg-config (this can
also be modified through PKG_CONFIG_PATH environment variable). Therefore
those of us who are using pkg-config for linking can easily select which
version of OSG we want to use."
This commit is contained in:
Robert Osfield 2009-01-27 15:34:57 +00:00
parent 0308a2005e
commit c898bc0ce7
2 changed files with 18 additions and 0 deletions

View File

@ -750,6 +750,15 @@ IF(CMAKE_CPACK_COMMAND)
ENDIF(BUILD_OSG_PACKAGES) ENDIF(BUILD_OSG_PACKAGES)
ENDIF(CMAKE_CPACK_COMMAND) ENDIF(CMAKE_CPACK_COMMAND)
# Generate pkg-config configuration file
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/openscenegraph.pc.in
${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc
@ONLY
)
INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
### uninstall target ### uninstall target
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------

View File

@ -86,3 +86,12 @@ ENDIF(WIN32)
# Make sure everyone can find Config # Make sure everyone can find Config
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include) INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
# Generate pkg-config configuration file
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/openthreads.pc.in
${PROJECT_BINARY_DIR}/packaging/pkgconfig/openthreads.pc
@ONLY
)
INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openthreads.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig)