diff --git a/CMakeLists.txt b/CMakeLists.txt index 2acb8b7..76b5a62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/crossguid.pc.in b/crossguid.pc.in new file mode 100644 index 0000000..efcfb11 --- /dev/null +++ b/crossguid.pc.in @@ -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