Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: remove broken logic to install 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. I tested some with trying to install the database directory directly, like this: ```cmake 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() ``` However, this causes build failures for Windows and macOS installers. Windows: ``` CMake Error at C:/Users/build/Documents/jenkins/workspace/test-pipelines_build-1.3/clamav-devel/build64/freshclam/cmake_install.cmake:66 (message): ABSOLUTE path INSTALL DESTINATION forbidden (by caller): C:/Users/build/Documents/jenkins/workspace/test-pipelines_build-1.3/clamav-devel/build64/install/database/ Call Stack (most recent call first): C:/Users/build/Documents/jenkins/workspace/test-pipelines_build-1.3/clamav-devel/build64/cmake_install.cmake:133 (include) ``` macOS: ``` CMake Error at /Users/****/jenkins/workspace/test-pipelines_build-1.3/clamav-devel/build-pkg/freshclam/cmake_install.cmake:111 (file): file INSTALL cannot make directory "/usr/local/clamav/share/clamav": No such file or directory. Call Stack (most recent call first): /Users/****/jenkins/workspace/test-pipelines_build-1.3/clamav-devel/build-pkg/cmake_install.cmake:122 (include) CPack Error: Error when generating package: ClamAV ``` I think my best option is just to remove this line of code since it's causing problems for some and isn't working for anyone. Even if it would be nice to have the database directory created at install time automatically. Fixes: #1142
- Loading branch information