From 742ee4292465436fad31ad9e6042969d24cab8d6 Mon Sep 17 00:00:00 2001 From: Micah Snyder Date: Mon, 8 Aug 2022 10:20:39 -0700 Subject: [PATCH] CMake Windows: fix issue building with tests and also unrar or mspack disabled --- unit_tests/CMakeLists.txt | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index 1460357bad..803f1b53b3 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -469,12 +469,16 @@ if(WIN32) # Collect our libs file(COPY $ DESTINATION $) - if(NOT ENABLE_EXTERNAL_MSPACK) - file(COPY $ DESTINATION $) - endif() file(COPY $ DESTINATION $) - file(COPY $ DESTINATION $) - file(COPY $ DESTINATION $) + if ($) + file(COPY $,ClamAV::libmspack,check_clamav>> DESTINATION $) + endif() + if ($) + file(COPY $,ClamAV::libunrar,check_clamav>> DESTINATION $) + endif() + if ($) + file(COPY $,ClamAV::libunrar_iface,check_clamav>> DESTINATION $) + endif() # Collect our apps file(COPY $ DESTINATION $) @@ -520,11 +524,15 @@ if(WIN32) # Collect our libs file(COPY $ DESTINATION $) - if(NOT ENABLE_EXTERNAL_MSPACK) - file(COPY $ DESTINATION $) + if ($) + file(COPY $,ClamAV::libmspack,check_clamav>> DESTINATION $) + endif() + if ($) + file(COPY $,ClamAV::libunrar,check_clamav>> DESTINATION $) + endif() + if ($) + file(COPY $,ClamAV::libunrar_iface,check_clamav>> DESTINATION $) endif() - file(COPY $ DESTINATION $) - file(COPY $ DESTINATION $) ]]) endif()