From 838322299a7ebadeeaf41dd1790cb5a7ef70c7b7 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Fri, 20 Dec 2013 13:13:35 +0100 Subject: [PATCH] generate pkgconfig file --- CMakeLists.txt | 8 +++++--- cmake/pkgconfig.in | 10 ++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 cmake/pkgconfig.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d2af604c4b..f408ec6e3bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ else() message(WARNING "Building on a 32 bit system is unsupported") endif() -include_directories(${CMAKE_SOURCE_DIR}/Library/include) +include_directories(${CMAKE_SOURCE_DIR}/Include/) add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/Util/UUID.cpp UUID.cpp.alwaysbuild COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_SOURCE_DIR} @@ -33,7 +33,7 @@ add_custom_target(UUIDConfigure DEPENDS ${CMAKE_SOURCE_DIR}/Util/UUID.cpp) set(BOOST_COMPONENTS filesystem iostreams program_options regex system thread) configure_file( - Util/GitDescription.cpp.in + ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp.in ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp ) file(GLOB ExtractorGlob Extractor/*.cpp) @@ -212,7 +212,7 @@ if(WITH_TOOLS) endif() endif() -file(GLOB InstallGlob Library/include/*.h Library/OSRM.h) +file(GLOB InstallGlob Include/osrm*.h Library/OSRM.h) install(FILES ${InstallGlob} DESTINATION include/osrm) install(TARGETS osrm-extract DESTINATION bin) @@ -220,3 +220,5 @@ install(TARGETS osrm-prepare DESTINATION bin) install(TARGETS osrm-datastore DESTINATION bin) install(TARGETS osrm-routed DESTINATION bin) install(TARGETS OSRM DESTINATION lib) +configure_file(${CMAKE_SOURCE_DIR}/cmake/pkgconfig.in libosrm.pc @ONLY) +install(FILES ${PROJECT_BINARY_DIR}/libosrm.pc DESTINATION lib/pkgconfig) diff --git a/cmake/pkgconfig.in b/cmake/pkgconfig.in new file mode 100644 index 00000000000..bb2d45b8d53 --- /dev/null +++ b/cmake/pkgconfig.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=${prefix}/include/osrm +libdir=${prefix}/lib + +Name: libOSRM +Description: Project OSRM library +Version: @GIT_DESCRIPTION@ +Requires: +Libs: -lOSRM +Cflags: -L${libdir} -I${includedir}