diff --git a/libclamav_rust/CMakeLists.txt b/libclamav_rust/CMakeLists.txt index 7df3ffee91..8da00bb6fb 100644 --- a/libclamav_rust/CMakeLists.txt +++ b/libclamav_rust/CMakeLists.txt @@ -17,4 +17,10 @@ if (WIN32) target_link_libraries(clamav_rust PUBLIC INTERFACE Userenv) endif() +if(WIN32) + install(FILES $ DESTINATION . COMPONENT libraries) +else() + install(FILES $ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) +endif() + add_library(ClamAV::libclamav_rust ALIAS clamav_rust) diff --git a/libclammspack/CMakeLists.txt b/libclammspack/CMakeLists.txt index f441eb2817..e09b0cfb56 100644 --- a/libclammspack/CMakeLists.txt +++ b/libclammspack/CMakeLists.txt @@ -103,6 +103,12 @@ if(ENABLE_STATIC_LIB) ${CMAKE_CURRENT_BINARY_DIR} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/mspack ) + if(WIN32) + install(TARGETS clammspack_static DESTINATION . COMPONENT libraries) + else() + install(TARGETS clammspack_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) + endif() + add_library( ClamAV::libmspack_static ALIAS clammspack_static ) if(NOT ENABLE_SHARED_LIB) add_library( ClamAV::libmspack ALIAS clammspack_static ) diff --git a/libclamunrar/CMakeLists.txt b/libclamunrar/CMakeLists.txt index 7d6f393f10..97eb4ccc95 100644 --- a/libclamunrar/CMakeLists.txt +++ b/libclamunrar/CMakeLists.txt @@ -133,6 +133,12 @@ if(ENABLE_STATIC_LIB) COMPILE_FLAGS "-Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else") endif() + if(WIN32) + install(TARGETS clamunrar_static DESTINATION . COMPONENT libraries) + else() + install(TARGETS clamunrar_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) + endif() + add_library( ClamAV::libunrar_static ALIAS clamunrar_static ) if(NOT ENABLE_SHARED_LIB) add_library( ClamAV::libunrar ALIAS clamunrar_static ) diff --git a/libclamunrar_iface/CMakeLists.txt b/libclamunrar_iface/CMakeLists.txt index e193adc5ae..8a55692919 100644 --- a/libclamunrar_iface/CMakeLists.txt +++ b/libclamunrar_iface/CMakeLists.txt @@ -109,6 +109,12 @@ if(ENABLE_UNRAR) PRIVATE ClamAV::libunrar_static ) + if(WIN32) + install(TARGETS clamunrar_iface_static DESTINATION . COMPONENT libraries) + else() + install(TARGETS clamunrar_iface_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) + endif() + add_library( ClamAV::libunrar_iface_static ALIAS clamunrar_iface_static ) if(NOT ENABLE_SHARED_LIB) add_library( ClamAV::libunrar_iface ALIAS clamunrar_iface_static )