Skip to content

Commit

Permalink
generate pkgconfig file
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Dec 20, 2013
1 parent 41f3f53 commit 8383222
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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)
Expand Down Expand Up @@ -212,11 +212,13 @@ 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)
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)
10 changes: 10 additions & 0 deletions cmake/pkgconfig.in
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 8383222

Please sign in to comment.