forked from AshBT/Dato-Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExternalProjectHDFS.cmake
38 lines (34 loc) · 1.48 KB
/
ExternalProjectHDFS.cmake
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
28
29
30
31
32
33
34
35
# LibHDFS =====================================================================
# If JNI is found we install libhdfs which allows programs to read and write
# to hdfs filesystems
# md5: c78cf463decb3ae9611bcea3cee1948e
# url: http://s3-us-west-2.amazonaws.com/glbin-engine/gl_libhdfs.tar.gz
if (APPLE)
ExternalProject_Add(hadoop
PREFIX ${CMAKE_SOURCE_DIR}/deps/hadoop
URL http://s3-us-west-2.amazonaws.com/glbin-engine/gl_libhdfs_20140714190709.tar.gz
URL_MD5 0e9d4b0a1e6811d25ae78f8e7adcc328
BUILD_IN_SOURCE 1
INSTALL_DIR ${CMAKE_SOURCE_DIR}/deps/local
CONFIGURE_COMMAND ""
UPDATE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND bash -c "mkdir -p <INSTALL_DIR>/include && cp <SOURCE_DIR>/hdfs.h <INSTALL_DIR>/include && cp <SOURCE_DIR>/osx/libhdfs.so <INSTALL_DIR>/lib")
else()
ExternalProject_Add(hadoop
PREFIX ${CMAKE_SOURCE_DIR}/deps/hadoop
URL http://s3-us-west-2.amazonaws.com/glbin-engine/gl_libhdfs_20140714190709.tar.gz
URL_MD5 0e9d4b0a1e6811d25ae78f8e7adcc328
BUILD_IN_SOURCE 1
INSTALL_DIR ${CMAKE_SOURCE_DIR}/deps/local
CONFIGURE_COMMAND ""
UPDATE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND bash -c "mkdir -p <INSTALL_DIR>/include && cp <SOURCE_DIR>/hdfs.h <INSTALL_DIR>/include && cp <SOURCE_DIR>/linux/libhdfs.so <INSTALL_DIR>/lib")
endif()
add_definitions(-DHAS_HADOOP)
set(HAS_HADOOP ON CACHE bool "Use hadoop dependency")
macro(requires_hdfs NAME)
target_link_libraries(${NAME} hdfs ${JAVA_JVM_LIBRARY})
add_dependencies(${NAME} hadoop)
endmacro(requires_hdfs)