clamav/libfreshclam
Micah Snyder 134b4e7f3c
CMake: Fix Windows build issue w/ conflicting libraries
At install, the CMake build may fail if it detects the same library
dependency in two locations. This happened for us with the following
error:

  CMake Error at libfreshclam/cmake_install.cmake:157 (file):
    file Multiple conflicting paths found for libcrypto-3-x64.dll:

      C:/Users/clamav_jenkins_svc.TALOS/clam_dependencies/x64/lib/libcrypto-3-x64.dll
      C:/WINDOWS/system32/libcrypto-3-x64.dll
      C:\WINDOWS\system32/libcrypto-3-x64.dll
  Call Stack (most recent call first):
    cmake_install.cmake:96 (include)

This happens when system provided DLL names match exactly with the ones
we provide. ClamAV woudld't prefer that DLL at load time, because it
looks in the EXE directory first. But it does confuse the `file()`
command used to locate build dependencies.

The fix in this commit uses a regex to exclude all libraries found under
C:\Windows
2025-05-21 17:12:50 -04:00
..
CMakeLists.txt CMake: Fix Windows build issue w/ conflicting libraries 2025-05-21 17:12:50 -04:00
dns.c Fix freshclam and sigtool logging issues 2023-05-19 16:59:20 -07:00
dns.h Bump copyright for 2022 2022-01-09 14:23:25 -07:00
Doxyfile FreshClam: Improved HTTP 304, 403, & 429 handling 2021-04-05 12:29:02 -07:00
libfreshclam.c Fix freshclam and sigtool logging issues 2023-05-19 16:59:20 -07:00
libfreshclam.h Bump copyright for 2022 2022-01-09 14:23:25 -07:00
libfreshclam.map freshclam autotools: Fix libshared.a linking issue 2020-09-06 15:50:58 -07:00
libfreshclam_internal.c Freshclam: remove curl result warning 2023-10-19 20:57:10 -05:00
libfreshclam_internal.h Clang-format touchup 2022-07-22 12:44:08 -07:00
libfreshclam_main.c Bump copyright for 2022 2022-01-09 14:23:25 -07:00