projects
/
platform
/
upstream
/
lz4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9631e4
)
fix cmake build of shared dll with visual
author
Yann Collet
<cyan@fb.com>
Wed, 11 Nov 2020 08:32:49 +0000
(
00:32
-0800)
committer
Yann Collet
<cyan@fb.com>
Wed, 11 Nov 2020 08:32:49 +0000
(
00:32
-0800)
inspired from #891
build/cmake/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/build/cmake/CMakeLists.txt
b/build/cmake/CMakeLists.txt
index 1bb2f5aa3dfe8c357e5cea2569a60e725158649f..57501ee7890bd1b86975dfae29a0ce452c1653a9 100644
(file)
--- 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)