summaryrefslogtreecommitdiff
blob: d801eb65b437d0180d4e83a9a2de1674455c6fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- CMakeLists.txt.orig	2014-02-10 14:26:48.299381259 -0800
+++ CMakeLists.txt	2014-02-10 14:51:16.401051546 -0800
@@ -56,8 +56,22 @@
 set(CMAKE_VERBOSE_MAKEFILE 1)
 
 # Embedded libraries
-add_subdirectory(thirdparty/blosc)
-include_directories(thirdparty/blosc/blosc)
+option(DYND_INTERNAL_CBLOSC
+       "Build and use the bundled c-blosc library"
+       OFF)
+if(DYND_INTERNAL_CBLOSC)
+  add_subdirectory(thirdparty/blosc)
+  include_directories(thirdparty/blosc/blosc)
+else()
+  find_path(CBLOSC_INCLUDE_DIR blosc.h)
+  find_library(CBLOSC_LIBRARY NAMES blosc)
+  if (CBLOSC_INCLUDE_DIR AND CBLOSC_LIBRARY)
+    message(STATUS "Found c-blosc library: ${CBLOSC_LIBRARY}")
+  else ()
+    message(ERROR "No c-blosc found. Consider using internal sources.")
+  endif()
+endif(DYND_INTERNAL_CBLOSC)
+
 add_subdirectory(thirdparty/datetime)
 include_directories(thirdparty/datetime/include)