Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static-libs installation #1100

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
6 changes: 6 additions & 0 deletions libclammspack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
6 changes: 6 additions & 0 deletions libclamunrar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
6 changes: 6 additions & 0 deletions libclamunrar_iface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
Loading