--- libsbml-5.19.5/CMakeLists.txt.orig	2022-05-02 12:08:23.000000000 +0300
+++ libsbml-5.19.5/CMakeLists.txt	2022-05-30 09:58:48.091248700 +0300
@@ -611,7 +611,7 @@
 endif(WITH_ZLIB)
 
 # install find scripts only for used dependencies
-install(FILES ${LIBSBML_FIND_MODULES} DESTINATION share/cmake/Modules)
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/FindLIBSBML.cmake" DESTINATION share/cmake/Modules)
 
 ###############################################################################
 #
@@ -708,6 +708,7 @@
     set(FILE_SEP ";")
     if(MINGW)
         set(LIBSBML_LIBRARY sbml)
+        set(MISC_PREFIX "${CMAKE_INSTALL_DATADIR}/libsbml/")
     else()
         set(LIBSBML_LIBRARY libsbml)
     endif()
@@ -1024,8 +1025,8 @@
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Version: ${PACKAGE_VERSION}\n")
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "\n")
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "prefix=${CMAKE_INSTALL_PREFIX}\n")
-file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "libdir=${CMAKE_INSTALL_FULL_LIBDIR}\n")
-file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}\n")
+file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "libdir=\${prefix}/${CMAKE_INSTALL_LIBDIR}\n")
+file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "includedir=\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}\n")
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "\n")
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Libs: -L\${libdir} -lsbml\n")
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Libs.private:        ${PRIVATE_LIBS}\n")
