Skip to content

Commit

Permalink
Merge pull request #51 from olafhering/pkgconfig
Browse files Browse the repository at this point in the history
provide a pkg-config crossguid.pc file
  • Loading branch information
Graeme Hill authored May 29, 2019
2 parents 5adbb1a + 9174c83 commit ca1bf4b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
# Install readme and license
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" "${CMAKE_CURRENT_SOURCE_DIR}/README.md"
DESTINATION ${CROSSGUID_ADDITIONAL_FILES_INSTALL_DIR})

configure_file(crossguid.pc.in ${PROJECT_BINARY_DIR}/crossguid.pc @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/crossguid.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
endif()

if (CROSSGUID_TESTS)
Expand Down
11 changes: 11 additions & 0 deletions crossguid.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@

Name: crossguid
Description: Lightweight cross platform C++ GUID/UUID library
URL: https://github.com/graeme-hill/crossguid
Version: @PROJECT_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lcrossguid

0 comments on commit ca1bf4b

Please sign in to comment.