From 35a5657b324c4a6b8ffd329be9c6c29e3a431df5 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 23 Apr 2018 12:52:48 +0100
Subject: [PATCH 3/5] CMake: Add LZ4_DLL_EXPORT=1/LZ4_DLL_IMPORT=1 to
 compile_def PRIVATE/IMPORT compile_def for lz4_shared

---
 contrib/cmake_unofficial/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/cmake_unofficial/CMakeLists.txt b/contrib/cmake_unofficial/CMakeLists.txt
index b402153..c98ad0e 100644
--- a/contrib/cmake_unofficial/CMakeLists.txt
+++ b/contrib/cmake_unofficial/CMakeLists.txt
@@ -106,6 +106,9 @@ if(BUILD_SHARED_LIBS)
     OUTPUT_NAME lz4
     SOVERSION "${LZ4_VERSION_MAJOR}"
     VERSION "${LZ4_VERSION_STRING}")
+  target_compile_definitions(lz4_shared
+    PRIVATE LZ4_DLL_EXPORT=1
+    INTERFACE LZ4_DLL_IMPORT=1)
   list(APPEND LZ4_LIBRARIES_BUILT lz4_shared)
 endif()
 if(BUILD_STATIC_LIBS)
-- 
2.17.0

