Skip to content

Commit

Permalink
add static library installation in CMakeLists.txt of libclamav submod…
Browse files Browse the repository at this point in the history
…ules
  • Loading branch information
driverxdw committed Nov 27, 2023
1 parent caf324e commit 117c633
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libclamav_rust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ if (WIN32)
target_link_libraries(clamav_rust PUBLIC INTERFACE Userenv)
endif()

if(WIN32)
install(FILES $<TARGET_FILE:clamav_rust> DESTINATION . COMPONENT libraries)
else()
install(FILES $<TARGET_FILE:clamav_rust> DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
endif()

add_library(ClamAV::libclamav_rust ALIAS clamav_rust)
7 changes: 7 additions & 0 deletions libclammspack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ if(ENABLE_STATIC_LIB)
${CMAKE_CURRENT_BINARY_DIR}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/mspack )

if(WIN32)
install(TARGETS clammspack_static DESTINATION . COMPONENT libraries)
install(FILES $<TARGET_PDB_FILE:clammspack> DESTINATION . OPTIONAL 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 )
Expand Down
7 changes: 7 additions & 0 deletions libclamunrar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ 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)
install(FILES $<TARGET_PDB_FILE:clamunrar> DESTINATION . OPTIONAL 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 )
Expand Down
7 changes: 7 additions & 0 deletions libclamunrar_iface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ if(ENABLE_UNRAR)
PRIVATE
ClamAV::libunrar_static )

if(WIN32)
install(TARGETS clamunrar_iface_static DESTINATION . COMPONENT libraries)
install( FILES $<TARGET_PDB_FILE:clamunrar_iface> DESTINATION . OPTIONAL 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 )
Expand Down

0 comments on commit 117c633

Please sign in to comment.