diff --git a/libclamav/CMakeLists.txt b/libclamav/CMakeLists.txt index d20bf71f5b..ef619a6223 100644 --- a/libclamav/CMakeLists.txt +++ b/libclamav/CMakeLists.txt @@ -404,7 +404,8 @@ if(ENABLE_SHARED_LIB) add_library( clamav SHARED ) set_target_properties( clamav PROPERTIES VERSION ${LIBCLAMAV_VERSION} - SOVERSION ${LIBCLAMAV_SOVERSION} ) + SOVERSION ${LIBCLAMAV_SOVERSION} + LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclamav.map) target_sources( clamav PRIVATE ${LIBCLAMAV_SOURCES} diff --git a/libfreshclam/CMakeLists.txt b/libfreshclam/CMakeLists.txt index 4ee5391a10..284ae14b2d 100644 --- a/libfreshclam/CMakeLists.txt +++ b/libfreshclam/CMakeLists.txt @@ -67,7 +67,8 @@ if(ENABLE_SHARED_LIB) endif() set_target_properties(freshclam PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" - VERSION ${LIBFRESHCLAM_VERSION} SOVERSION ${LIBFRESHCLAM_SOVERSION}) + VERSION ${LIBFRESHCLAM_VERSION} SOVERSION ${LIBFRESHCLAM_SOVERSION} + LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libfreshclam.map) if(WIN32) install(TARGETS freshclam DESTINATION . COMPONENT libraries) install(FILES $ DESTINATION . OPTIONAL COMPONENT libraries)