Skip to content

Commit

Permalink
Add support for pkgconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
dermariusz authored and mpoquet committed Dec 10, 2018
1 parent 7476f8e commit 849e261
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ write_basic_package_version_file("${PROJECT_BINARY_DIR}/docopt-config-version.cm
install(FILES docopt-config.cmake ${PROJECT_BINARY_DIR}/docopt-config-version.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/docopt")
install(EXPORT ${export_name} DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/docopt")

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docopt.pc.in ${CMAKE_CURRENT_BINARY_DIR}/docopt.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/docopt.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

#============================================================================
# CPack
#============================================================================
Expand Down
9 changes: 9 additions & 0 deletions docopt.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_PREFIX@/include/docopt

Name: docopt.cpp
Description: C++11 port of docopt
Version: @PROJECT_VERSION@
Requires:
Libs: -L${libdir} -ldocopt
Cflags: -I${includedir}

0 comments on commit 849e261

Please sign in to comment.