2010-05-14 00:01:50 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
PROJECT (HDF5_HL_TOOLS)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Sources
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
SET (GIF2H5_SRCS
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif.h
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/decompress.c
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif2hdf.c
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif2mem.c
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gifread.c
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/writehdf.c
|
|
|
|
)
|
|
|
|
|
|
|
|
#-- Add gif2hdf5 program
|
2010-09-01 04:15:13 +08:00
|
|
|
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
|
2010-05-14 00:01:50 +08:00
|
|
|
INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE (gif2h5 ${GIF2H5_SRCS})
|
2011-01-05 02:40:26 +08:00
|
|
|
H5_NAMING (gif2h5 ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
|
|
|
|
#-- Add h52gif program
|
|
|
|
SET (hdf2gif_SRCS
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdf2gif.c
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdfgifwr.c
|
|
|
|
)
|
|
|
|
ADD_EXECUTABLE (hdf2gif ${hdf2gif_SRCS})
|
2011-01-05 02:40:26 +08:00
|
|
|
H5_NAMING (hdf2gif ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# This executable can generate the actual test files - Currently not
|
|
|
|
# used in the CMake Build system as we rely on the test files that are
|
|
|
|
# shipped with HDF5 source archives
|
|
|
|
# --------------------------------------------------------------------
|
2010-09-01 04:15:13 +08:00
|
|
|
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
2010-05-14 00:01:50 +08:00
|
|
|
ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
|
2011-01-05 02:40:26 +08:00
|
|
|
H5_NAMING (hl_h52gifgentest ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
|
|
|
|
# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
|
2010-09-01 04:15:13 +08:00
|
|
|
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add file(s) to CMake Install
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
INSTALL (
|
|
|
|
TARGETS
|
|
|
|
gif2h5
|
|
|
|
hdf2gif
|
|
|
|
RUNTIME DESTINATION
|
2010-09-21 04:38:35 +08:00
|
|
|
${HDF5_INSTALL_BIN_DIR}/tools
|
2010-05-20 04:11:00 +08:00
|
|
|
COMPONENT
|
|
|
|
hltoolsapplications
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|