From a5d3097f9c788d3d895dbbb622b67afcd77c9faf Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 9 Nov 2023 08:38:07 +0100 Subject: [PATCH] build DLL name with SOVERSION by default on Windows --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 018a97f..dc6187b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,9 @@ if(BUILD_SHARED_LIBS) if(NOT DEFINED CMAKE_C_VISIBILITY_PRESET) set(CMAKE_C_VISIBILITY_PRESET hidden) endif() + if (WIN32 AND NOT DEFINED CMAKE_DLL_NAME_WITH_SOVERSION) + set(CMAKE_DLL_NAME_WITH_SOVERSION ON) + endif() endif() find_library(MATH_LIBRARY m)