From: Scott Kitterman Date: Fri, 5 Jan 2018 14:06:49 +0000 (+0000) Subject: add_pkg_config X-Git-Tag: archive/raspbian/3.2-1+rpi1~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9dfcb759596d85f768f4ce96d7f3b8d0b379639f;p=libnitrokey.git add_pkg_config =================================================================== Gbp-Pq: Name add_pkg_config.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8259f67..c4a914b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,10 @@ file(GLOB LIB_INCLUDES "include/*.h") install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libnitrokey) install (TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) +# configure and install pkg-config file +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libnitrokey.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libnitrokey-1.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libnitrokey-1.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + OPTION(COMPILE_TESTS "Compile tests" FALSE) OPTION(COMPILE_OFFLINE_TESTS "Compile offline tests" FALSE) diff --git a/libnitrokey.pc.in b/libnitrokey.pc.in new file mode 100644 index 0000000..17cde1d --- /dev/null +++ b/libnitrokey.pc.in @@ -0,0 +1,10 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: libnitrokey +Description: Library for communicating with Nitrokey in a clean and easy manner +Version: @libnitrokey_VERSION@ +Requires.private: hidapi-libusb + +Libs: -L${libdir} -lnitrokey +Cflags: -I${includedir}