clamav/clamsubmit
Micah Snyder 4d6dc739be
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-04-18 13:25:26 -04:00
..
clamsubmit.c Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
CMakeLists.txt CMake: Fix Windows build issue w/ conflicting libraries 2025-04-18 13:25:26 -04:00