File output-date-pc-for-pkg-config.patch of Package date

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd0c3f2..567946e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -186,6 +186,14 @@ if( BUILD_TZ_LIB )
     endif( )
 endif( )
 
+if ( BUILD_TZ_LIB )
+  # Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@
+  set( TZ_COMPILE_DEFINITIONS "-D$<JOIN:$<TARGET_PROPERTY:date-tz,INTERFACE_COMPILE_DEFINITIONS>, -D>" )
+  configure_file(date.pc.in date.pc.cf @ONLY)
+  file( GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/date.pc"
+    INPUT "${CMAKE_CURRENT_BINARY_DIR}/date.pc.cf" )
+endif( )
+
 #[===================================================================[
    installation
 #]===================================================================]
@@ -215,6 +223,9 @@ if( ENABLE_DATE_INSTALL )
           LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
           RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )  # This is for Windows
       export( TARGETS date-tz NAMESPACE date:: APPEND FILE dateTargets.cmake )
+      install(
+          FILES ${CMAKE_BINARY_DIR}/date.pc
+          DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
   endif( )
 
   if( WIN32 AND NOT CYGWIN)
diff --git a/date.pc.in b/date.pc.in
new file mode 100644
index 0000000..afe660e
--- /dev/null
+++ b/date.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: date
+Description: A date and time library based on the C++11/14/17 <chrono> header
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -ldate-tz
+Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@
openSUSE Build Service is sponsored by