diff --git a/CMakeLists.txt b/CMakeLists.txt index f99732f9..836c8371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -322,6 +322,13 @@ if (OPENDHT_C) ) target_compile_definitions(opendht-c PRIVATE OPENDHT_C_BUILD) target_link_libraries(opendht-c opendht) + # PkgConfig module + configure_file ( + opendht-c.pc.in + opendht-c.pc + @ONLY + ) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/opendht-c.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif () if (OPENDHT_TOOLS) diff --git a/opendht-c.pc.in b/opendht-c.pc.in new file mode 100644 index 00000000..18f71988 --- /dev/null +++ b/opendht-c.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +Name: OpenDHT (C Wrapper) +Description: Distributed Hash Table library (C Wrapper) +Version: @VERSION@ +Libs: -L${libdir} -lopendht-c +Requires.private: opendht gnutls >= 3.1 @argon2_lib@ +Cflags: -I${includedir}