Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-03-13 14:33:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-13 14:36:01 +0300
commitbb825d02f8570c408f4266dfa4eff53d2d0bf4f6 (patch)
tree3c452fcb5497c8c72a1fd8ebf7f109e5a89055a6 /source
parent61eab743f1377fdfcf44f2e4928290a3fc4ccfea (diff)
CMake: unbundle LZO library
Patch T41989 by @hasufell
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/CMakeLists.txt13
-rw-r--r--source/blender/blenkernel/intern/pointcache.c8
2 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index b3469ceae57..a826fe26e68 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -422,9 +422,16 @@ if(WITH_JACK)
endif()
if(WITH_LZO)
- list(APPEND INC_SYS
- ../../../extern/lzo/minilzo
- )
+ if(WITH_SYSTEM_LZO)
+ list(APPEND INC_SYS
+ ${LZO_INCLUDE_DIR}
+ )
+ add_definitions(-DWITH_SYSTEM_LZO)
+ else()
+ list(APPEND INC_SYS
+ ../../../extern/lzo/minilzo
+ )
+ endif()
add_definitions(-DWITH_LZO)
endif()
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index e6d41063262..c477aabbb71 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -84,8 +84,12 @@
#endif
#ifdef WITH_LZO
-#include "minilzo.h"
-#define LZO_HEAP_ALLOC(var,size) \
+# ifdef WITH_SYSTEM_LZO
+# include <lzo/lzo1x.h>
+# else
+# include "minilzo.h"
+# endif
+# define LZO_HEAP_ALLOC(var,size) \
lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
#endif