Skip to content

Commit

Permalink
Fix issue installing empty database directory
Browse files Browse the repository at this point in the history
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: #1142
  • Loading branch information
micahsnyder committed Jan 16, 2024
1 parent c48146a commit 7157019
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion freshclam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ else()
endif()

# Install an empty database directory
INSTALL(CODE "FILE(MAKE_DIRECTORY \${ENV}\${CMAKE_INSTALL_PREFIX}/\${DATABASE_DIRECTORY})" COMPONENT programs)
if(IS_ABSOLUTE ${DATABASE_DIRECTORY})
INSTALL(DIRECTORY DESTINATION $ENV{DESTDIR}${DATABASE_DIRECTORY} COMPONENT programs)
else()
INSTALL(DIRECTORY DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${DATABASE_DIRECTORY} COMPONENT programs)
endif()

# Now we rename freshclam-bin executable to freshclam using target properties
set_target_properties( freshclam-bin
Expand Down

0 comments on commit 7157019

Please sign in to comment.