generate pkgconfig file

This commit is contained in:
DennisOSRM 2013-12-20 13:13:35 +01:00
parent 41f3f53540
commit 838322299a
2 changed files with 15 additions and 3 deletions

View File

@ -17,7 +17,7 @@ else()
message(WARNING "Building on a 32 bit system is unsupported") message(WARNING "Building on a 32 bit system is unsupported")
endif() 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 add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/Util/UUID.cpp UUID.cpp.alwaysbuild
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_SOURCE_DIR} 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) set(BOOST_COMPONENTS filesystem iostreams program_options regex system thread)
configure_file( configure_file(
Util/GitDescription.cpp.in ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp.in
${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp
) )
file(GLOB ExtractorGlob Extractor/*.cpp) file(GLOB ExtractorGlob Extractor/*.cpp)
@ -212,7 +212,7 @@ if(WITH_TOOLS)
endif() endif()
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(FILES ${InstallGlob} DESTINATION include/osrm)
install(TARGETS osrm-extract DESTINATION bin) 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-datastore DESTINATION bin)
install(TARGETS osrm-routed DESTINATION bin) install(TARGETS osrm-routed DESTINATION bin)
install(TARGETS OSRM DESTINATION lib) 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)

10
cmake/pkgconfig.in Normal file
View File

@ -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}