diff --git a/cmake/FixInterfaceIncludes.cmake b/cmake/FixInterfaceIncludes.cmake index 513c1117..5c285d7a 100644 --- a/cmake/FixInterfaceIncludes.cmake +++ b/cmake/FixInterfaceIncludes.cmake @@ -19,6 +19,13 @@ function(fix_interface_includes) if (PARENT_DIR MATCHES "include$") list(APPEND NEW_DIRS "${PARENT_DIR}") endif() + + # HACK + # The libarchive pkg-config file in MSYS2 seems to include a UNIX-style path for its + # include directory and CMake doesn't like that. + if (WIN32 AND MINGW AND target STREQUAL PkgConfig::LibArchive) + list(FILTER DIRS EXCLUDE REGEX "^/[^.]+64/.*") + endif() endforeach() list(APPEND DIRS ${NEW_DIRS})