summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2020-11-11 15:48:35 -0800
committerGitHub <noreply@github.com>2020-11-11 15:48:35 -0800
commit3771943c7e78d27f138e3520f0573b4b4acb4838 (patch)
tree0511dbed648a23400ee6a119ba976d6a98dfb4d8
parent9061a0a93582854cbddb64cb048ae527a0c220af (diff)
parentd2a1f3b23935db35dc04a6842b988bec28afadab (diff)
downloadlz4-3771943c7e78d27f138e3520f0573b4b4acb4838.tar.gz
lz4-3771943c7e78d27f138e3520f0573b4b4acb4838.tar.bz2
lz4-3771943c7e78d27f138e3520f0573b4b4acb4838.zip
Merge pull request #949 from lz4/cmakedll
fix cmake build of shared dll with visual
-rw-r--r--build/cmake/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
index 1bb2f5a..57501ee 100644
--- a/build/cmake/CMakeLists.txt
+++ b/build/cmake/CMakeLists.txt
@@ -107,6 +107,10 @@ if(BUILD_SHARED_LIBS)
OUTPUT_NAME lz4
SOVERSION "${LZ4_VERSION_MAJOR}"
VERSION "${LZ4_VERSION_STRING}")
+ if(MSVC)
+ target_compile_definitions(lz4_shared PRIVATE
+ LZ4_DLL_EXPORT=1)
+ endif()
list(APPEND LZ4_LIBRARIES_BUILT lz4_shared)
endif()
if(BUILD_STATIC_LIBS)