$NetBSD: patch-cmake_autotools_expat-noconfig____macos.cmake.in,v 1.1 2024/12/18 15:03:58 brook Exp $ On Darwin, the installed expat shared library includes only the major version number, not minor version and patch, in the name. The corresponding configure check, however, looks for the full name with all three parts and fails. The same problem occurs on Windows and is discussed in issue 485, even mentioning that Darwin likely has the same issue: https://github.com/libexpat/libexpat/issues/485 For some reason, the fix (removing minor and patch versions from the cmake file used by configure) was applied for Windows but not for Darwin. See the upstream issue: https://github.com/libexpat/libexpat/issues/935 which was closed with https://github.com/libexpat/libexpat/pull/937 --- cmake/autotools/expat-noconfig__macos.cmake.in.orig 2023-08-26 12:27:53.000000000 +0000 +++ cmake/autotools/expat-noconfig__macos.cmake.in @@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1) # Import target "expat::expat" for configuration "NoConfig" set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) set_target_properties(expat::expat PROPERTIES - IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.dylib" IMPORTED_SONAME_NOCONFIG "@rpath/libexpat.@SO_MAJOR@.dylib" ) list(APPEND _cmake_import_check_targets expat::expat ) -list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" ) +list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.dylib" ) # Commands beyond this point should not need to know the version. set(CMAKE_IMPORT_FILE_VERSION)