From c898bc0ce74b4007ea1892877bfba33a29ff5e01 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 27 Jan 2009 15:34:57 +0000 Subject: [PATCH] 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." --- CMakeLists.txt | 9 +++++++++ src/OpenThreads/CMakeLists.txt | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ee4d9744..06d6102e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -750,6 +750,15 @@ IF(CMAKE_CPACK_COMMAND) ENDIF(BUILD_OSG_PACKAGES) 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 #----------------------------------------------------------------------------- diff --git a/src/OpenThreads/CMakeLists.txt b/src/OpenThreads/CMakeLists.txt index 1402def06..f5b04fa18 100644 --- a/src/OpenThreads/CMakeLists.txt +++ b/src/OpenThreads/CMakeLists.txt @@ -86,3 +86,12 @@ ENDIF(WIN32) # Make sure everyone can find Config 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)