From 34d4d0ed83c9e726005b4860d97c595b47ed0787 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 2 Jan 2023 15:51:42 +0100 Subject: [PATCH] Add a dependency for the version map. Add a dependcy on that version map so that it is re-run once it changes. Signed-off-by: Sebastian Andrzej Siewior --- libclamav/CMakeLists.txt | 3 ++- libfreshclam/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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)