From 7853f85f7f5f3226eafe35daddf948392894cf38 Mon Sep 17 00:00:00 2001 From: Micah Snyder Date: Tue, 16 Jan 2024 15:16:25 -0500 Subject: [PATCH] Fix issue installing empty database directory The CMake code to install the empty database directory doesn't appear to do anything. Further, it is causing build issues for some users. Instead of running code to make the directory, it appears we can just install a directory directly. Fixes: https://github.com/Cisco-Talos/clamav/issues/1142 --- freshclam/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freshclam/CMakeLists.txt b/freshclam/CMakeLists.txt index ef3616fe32..e166d30c29 100644 --- a/freshclam/CMakeLists.txt +++ b/freshclam/CMakeLists.txt @@ -47,7 +47,7 @@ else() endif() # Install an empty database directory -INSTALL(CODE "FILE(MAKE_DIRECTORY \${ENV}\${CMAKE_INSTALL_PREFIX}/\${DATABASE_DIRECTORY})" COMPONENT programs) +INSTALL(DIRECTORY DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${DATABASE_DIRECTORY} COMPONENT programs) # Now we rename freshclam-bin executable to freshclam using target properties set_target_properties( freshclam-bin