File xmss-pkgconfig.patch of Package xmss

Index: xmss-library-2.0.0/src/CMakeLists.txt
===================================================================
--- xmss-library-2.0.0.orig/src/CMakeLists.txt
+++ xmss-library-2.0.0/src/CMakeLists.txt
@@ -65,6 +65,12 @@ if(BUILD_SHARED_LIBS)
     endif()
 endif()
 
+# generate pkg-config file
+configure_file(
+     ${CMAKE_CURRENT_SOURCE_DIR}/libxmss.pc.in
+     ${CMAKE_CURRENT_BINARY_DIR}/libxmss.pc
+@ONLY)
+
 # Our actual library target amalgamates all sources into one; see comment in libxmss.c for rationale.
 add_library(xmss
     libxmss.c
@@ -85,3 +91,7 @@ target_link_libraries(xmss
     PUBLIC ${XMSS_HASH_OVERRIDE_LINK_LIBRARIES}
 )
 install(TARGETS xmss)
+# Install pkg-config files
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libxmss.pc"
+        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
Index: xmss-library-2.0.0/src/libxmss.pc.in
===================================================================
--- /dev/null
+++ xmss-library-2.0.0/src/libxmss.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: @PROJECT_NAME@
+Description: Pure C99 implementation of the XMSS algorithm.
+Version: @XMSS_VERSION_TEXT@
+Requires.private: @_oqs_pkgconfig_requires_private@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lxmss
openSUSE Build Service is sponsored by