This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
hdf5.cmake
49 lines (40 loc) · 1.47 KB
/
hdf5.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# Install hdf5 library from source
#
if (NOT hdf5_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (PatchSupport)
include (zlib)
external_source (hdf5
1.8.9
hdf5-1.8.9.tar.gz
d1266bb7416ef089400a15cc7c963218
http://www.hdfgroup.org/ftp/HDF5/current/src)
set (hdf5_HL_LIBRARIES ${BUILDEM_LIB_DIR}/libhdf5_hl.so)
set (hdf5_LIBRARIES ${BUILDEM_LIB_DIR}/libhdf5.so ${hdf5_HL_LIBRARIES})
message ("Installing ${hdf5_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${hdf5_NAME}
DEPENDS ${zlib_NAME}
PREFIX ${BUILDEM_DIR}
URL ${hdf5_URL}
URL_MD5 ${hdf5_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE}
${hdf5_SRC_DIR}/CMakeLists.txt ${PATCH_DIR}/hdf5-1.patch
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${hdf5_SRC_DIR}
-DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR}
-DCMAKE_PREFIX_PATH=${BUILDEM_DIR}
-DHDF5_BUILD_HL_LIB=ON
-DHDF5_BUILD_CPP_LIB=ON
-DBUILD_SHARED_LIBS=ON
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON
# -DBUILD_TESTING=ON
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
# TEST_COMMAND $(MAKE) check
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
)
set_target_properties(${hdf5_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT hdf5_NAME)