2013-01-15 02:35:30 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8.10)
|
2010-05-14 00:01:50 +08:00
|
|
|
PROJECT (HDF5_HL_TOOLS)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Sources
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
set (GIF2H5_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${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)
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (gif2h5 ${GIF2H5_SRCS})
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (gif2h5 ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (gif2h5 " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-- Add h52gif program
|
2014-03-12 05:14:57 +08:00
|
|
|
set (hdf2gif_SRCS
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdf2gif.c
|
|
|
|
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdfgifwr.c
|
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (h52gif ${hdf2gif_SRCS})
|
2011-03-02 03:05:27 +08:00
|
|
|
TARGET_NAMING (h52gif ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h52gif " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (BUILD_TESTING)
|
2013-08-20 05:49:44 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# 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
|
|
|
|
# --------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
|
|
|
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
|
2013-08-20 05:49:44 +08:00
|
|
|
TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE})
|
|
|
|
TARGET_C_PROPERTIES (hl_h52gifgentest " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2013-08-20 05:49:44 +08:00
|
|
|
# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
include (CMakeTests.cmake)
|
|
|
|
endif (BUILD_TESTING)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add file(s) to CMake Install
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
install (
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGETS
|
|
|
|
gif2h5
|
2011-03-02 03:05:27 +08:00
|
|
|
h52gif
|
2010-05-14 00:01:50 +08:00
|
|
|
RUNTIME DESTINATION
|
2012-06-20 22:43:02 +08:00
|
|
|
${HDF5_INSTALL_BIN_DIR}
|
2010-05-20 04:11:00 +08:00
|
|
|
COMPONENT
|
|
|
|
hltoolsapplications
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|