From 4dd78f2debf7ca240696169365b75fb289dc3085 Mon Sep 17 00:00:00 2001 From: David Haney Date: Wed, 26 Mar 2025 08:05:35 -0700 Subject: [PATCH] Export symbols from snappy_test_support when building shared This replicates existing logic that was previously applied to the `snappy` library. fixes #202 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97397da..55501fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,6 +298,9 @@ if(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS) # Test files include snappy-test.h, HAVE_CONFIG_H must be defined. target_compile_definitions(snappy_test_support PUBLIC -DHAVE_CONFIG_H) + if(BUILD_SHARED_LIBS) + set_target_properties(snappy_test_support PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + endif(BUILD_SHARED_LIBS) target_link_libraries(snappy_test_support snappy)