diff --git a/helper.pl b/helper.pl index ffc592a7..8a430f73 100755 --- a/helper.pl +++ b/helper.pl @@ -249,7 +249,11 @@ sub make_sources_cmake { foreach my $hobj (sort @headers) { $output .= $hobj . "\n"; } - $output .= ")\n"; + $output .= ") + +if(MSVC AND BUILD_SHARED_LIBS) + list(APPEND SOURCES tommath.def) +endif()\n"; return $output; } diff --git a/sources.cmake b/sources.cmake index e3c12433..ba3012ef 100644 --- a/sources.cmake +++ b/sources.cmake @@ -173,3 +173,7 @@ tommath_cutoffs.h tommath_private.h tommath_superclass.h ) + +if(MSVC AND BUILD_SHARED_LIBS) + list(APPEND SOURCES tommath.def) +endif()