diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2e97c6..442ff7e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -435,8 +435,9 @@ set(LIBSBML_XML_LIBRARY_LIBS)
 if(WITH_EXPAT)
   
     if(NOT TARGET EXPAT::EXPAT)
-    find_package(EXPAT REQUIRED)
     endif()
+    find_package(EXPAT NAMES expat REQUIRED)
+    set(EXPAT_LIBRARY expat::expat)
 
     add_definitions( -DUSE_EXPAT )
     list(APPEND SWIG_EXTRA_ARGS -DUSE_EXPAT)
@@ -457,7 +458,8 @@ endif(WITH_EXPAT)
 set(USE_LIBXML OFF)
 if(WITH_LIBXML)
 
-  find_package(LIBXML REQUIRED)
+  find_package(LIBXML NAMES LibXml2 REQUIRED)
+  set(LIBXML_LIBRARY LibXml2::LibXml2)
   
   add_definitions( -DUSE_LIBXML )
   list(APPEND SWIG_EXTRA_ARGS -DUSE_LIBXML)
@@ -509,7 +511,7 @@ endif()
 option(WITH_BZIP2    "Enable the use of bzip2 compression."  ${BZIP_INITIAL_VALUE})
 set(USE_BZ2 OFF)
 if(WITH_BZIP2)
-  find_package(BZ2 REQUIRED)
+  find_package(BZip2 REQUIRED)
   set(USE_BZ2 ON)
   add_definitions( -DUSE_BZ2 )
   list(APPEND SWIG_EXTRA_ARGS -DUSE_BZ2)
@@ -535,6 +537,9 @@ Separate multiple directories using semicolons." )
 # Locate zlib
 #
 
+if(WITH_ZLIB)
+    find_package(ZLIB REQUIRED)
+endif()
 set(ZLIB_INITIAL_VALUE)
 if (NOT LIBZ_LIBRARY)
 find_library(LIBZ_LIBRARY
@@ -569,66 +574,12 @@ option(WITH_ZLIB     "Enable the use of zip compression."    ${ZLIB_INITIAL_VALU
 
 set(USE_ZLIB OFF)
 if(WITH_ZLIB)
-
-  if (NOT LIBZ_INCLUDE_DIR)
-    find_path(LIBZ_INCLUDE_DIR
-        NAMES zlib.h zlib/zlib.h
-        PATHS ${CMAKE_OSX_SYSROOT}/usr/include
-              /usr/include /usr/local/include
-              ${LIBSBML_DEPENDENCY_DIR}/include
-              NO_DEFAULT_PATH
-        DOC "The directory containing the zlib include files."
-              )
-  endif()
-    if (NOT LIBZ_INCLUDE_DIR)
-        find_path(LIBZ_INCLUDE_DIR
-        NAMES zlib.h zlib/zlib.h
-        PATHS ${CMAKE_OSX_SYSROOT}/usr/include
-              /usr/include /usr/local/include
-              ${LIBSBML_DEPENDENCY_DIR}/include
-        DOC "The directory containing the zlib include files."
-              )
-    endif()
     set(USE_ZLIB ON)
     add_definitions( -DUSE_ZLIB )
   list(APPEND SWIG_EXTRA_ARGS -DUSE_ZLIB)
-
-    # make sure that we have a valid zip library
-    file(TO_CMAKE_PATH "${LIBZ_LIBRARY}" LIBZ_CMAKE_PATH)
-    check_library_exists("${LIBZ_CMAKE_PATH}" "gzopen" "" LIBZ_FOUND_SYMBOL)
-    if(NOT LIBZ_FOUND_SYMBOL)
-        # this is odd, but on windows this check always fails! must be a
-        # bug in the current cmake version so for now only issue this
-        # warning on linux
-        if(UNIX)
-            message(WARNING
-"The chosen zlib library does not appear to be valid because it is
-missing certain required symbols. Please check that ${LIBZ_LIBRARY} is
-the correct zlib library. For details about the error, please see
-${LIBSBML_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log")
-        endif()
-    endif()
-
-    if(NOT EXISTS "${LIBZ_INCLUDE_DIR}/zlib.h")
-        message(FATAL_ERROR
-"The include directory specified for zlib does not appear to be
-valid. It should contain the file zlib.h, but it does not.")
-    endif()
-
-  if(NOT TARGET ZLIB::ZLIB)
-    add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
-    set_target_properties(ZLIB::ZLIB PROPERTIES
-      IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-      IMPORTED_LOCATION "${LIBZ_LIBRARY}"
-      INTERFACE_INCLUDE_DIRECTORIES "${LIBZ_INCLUDE_DIR}")
-  endif()
-
-  list(APPEND LIBSBML_FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/FindZLIB.cmake")
-
 endif(WITH_ZLIB)
 
 # install find scripts only for used dependencies
-install(FILES ${LIBSBML_FIND_MODULES} DESTINATION share/cmake/Modules)
 
 ###############################################################################
 #
@@ -685,7 +636,12 @@ if(WITH_CHECK)
 
   enable_testing()
 
-  find_package(CHECK REQUIRED)
+  find_package(CHECK NAMES check REQUIRED)
+  if(BUILD_SHARED_LIBS)
+    add_library(CHECK::CHECK ALIAS Check::checkShared)
+  else()
+    add_library(CHECK::CHECK ALIAS Check::check)
+  endif()
 
   if (UNIX)
       # setup valgrind
@@ -1018,18 +974,29 @@ install(FILES ${DOCUMENTATION_FILES} DESTINATION ${MISC_PREFIX})
 # Write libsbml.pc
 #
 
-set (PRIVATE_LIBS "-lstdc++ -lm")
+set(FAKE_CXX_LINKAGE "")
+foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
+    if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
+        continue()
+    elseif(EXISTS "${lib}")
+        string(APPEND FAKE_CXX_LINKAGE " ${lib}")
+    else()
+        string(APPEND FAKE_CXX_LINKAGE " -l${lib}")
+    endif()
+endforeach()
+set (PRIVATE_LIBS "${FAKE_CXX_LINKAGE}")
+set (PRIVATE_REQUIRES "")
 if (WITH_ZLIB)
-set (PRIVATE_LIBS "${LIBZ_LIBRARY} ${PRIVATE_LIBS}")
+    string(APPEND PRIVATE_REQUIRES " zlib")
 endif()
 if (WITH_BZIP2)
-set (PRIVATE_LIBS "${LIBBZ_LIBRARY} ${PRIVATE_LIBS}")
+    string(APPEND PRIVATE_REQUIRES " bzip2")
 endif()
 if (WITH_LIBXML)
-set (PRIVATE_LIBS "${LIBXML_LIBRARY} ${PRIVATE_LIBS}")
+    string(APPEND PRIVATE_REQUIRES " libxml-2.0")
 endif()
 if (WITH_EXPAT)
-set (PRIVATE_LIBS "${LIBEXPAT_LIBRARY} ${PRIVATE_LIBS}")
+    string(APPEND PRIVATE_REQUIRES " expat")
 endif()
 if (WITH_XERCES)
 set (PRIVATE_LIBS "${XERCES_LIBRARY} ${PRIVATE_LIBS}")
@@ -1051,9 +1018,7 @@ if (WITH_XERCES)
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Conflicts: xerces-c = 2.6.0\n")
 endif()
 
-if (WITH_LIBXML)
-file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Requires.private: libxml-2.0 >= 2.6.22\n")
-endif()
+file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Requires.private: ${PRIVATE_REQUIRES}\n")
 
 if (UNIX OR MINGW)
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 79301a6..db54d8c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -311,7 +311,7 @@ if(WITH_BZIP2)
         sbml/compress/bzfstream.h
         sbml/compress/bzfstream.cpp
         )
-  set(LIBSBML_LIBS ${LIBSBML_LIBS} BZ2::BZ2)
+  set(LIBSBML_LIBS ${LIBSBML_LIBS} BZip2::BZip2)
 
 endif()
 
@@ -344,7 +344,11 @@ set(COMPRESS_SOURCES ${COMPRESS_SOURCES}
         )
     endif()
 
-    set(LIBSBML_LIBS ${LIBSBML_LIBS} ZLIB::ZLIB)
+    if(TARGET ZLIB::ZLIB_STATIC)
+        set(LIBSBML_LIBS ${LIBSBML_LIBS} ZLIB::ZLIB_STATIC)
+    else()
+        set(LIBSBML_LIBS ${LIBSBML_LIBS} ZLIB::ZLIB)
+    endif()
 
 endif()
 
@@ -405,7 +409,7 @@ if(WITH_EXPAT)
         sbml/xml/ExpatHandler.h
         sbml/xml/ExpatParser.h
     )
-    set(LIBSBML_LIBS ${LIBSBML_LIBS} EXPAT::EXPAT)
+    set(LIBSBML_LIBS ${LIBSBML_LIBS} expat::expat)
 
 endif(WITH_EXPAT)
 
@@ -423,7 +427,7 @@ if(WITH_LIBXML)
         sbml/xml/LibXMLParser.h
         sbml/xml/LibXMLTranscode.h
     )
-    set(LIBSBML_LIBS ${LIBSBML_LIBS} LIBXML::LIBXML)
+    set(LIBSBML_LIBS ${LIBSBML_LIBS} LibXml2::LibXml2)
 
 endif(WITH_LIBXML)
 
