summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-05-13 16:01:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-05-13 16:01:50 (GMT)
commitae06433ab0ca13838c2762c8fad165a041d64c42 (patch)
tree72d645731c00953c3daf6dad8a1cf0dc97326943 /hl/tools
parent940931aa853602b0b6edfd4ca1a6526fd7975dd2 (diff)
downloadhdf5-ae06433ab0ca13838c2762c8fad165a041d64c42.zip
hdf5-ae06433ab0ca13838c2762c8fad165a041d64c42.tar.gz
hdf5-ae06433ab0ca13838c2762c8fad165a041d64c42.tar.bz2
[svn-r18793] Add files to support building library with CMake
Tested: Local linux
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/CMakeLists.txt55
1 files changed, 55 insertions, 0 deletions
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
new file mode 100644
index 0000000..5730205
--- /dev/null
+++ b/hl/tools/CMakeLists.txt
@@ -0,0 +1,55 @@
+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
+INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
+INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5)
+
+ADD_EXECUTABLE (gif2h5 ${GIF2H5_SRCS})
+H5_NAMING (gif2h5)
+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})
+H5_NAMING (hdf2gif)
+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
+# --------------------------------------------------------------------
+IF (NOT BUILD_SHARED_LIBS)
+ ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
+ H5_NAMING (hl_h52gifgentest)
+ TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+
+# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
+ENDIF (NOT BUILD_SHARED_LIBS)
+
+#-----------------------------------------------------------------------------
+# Add file(s) to CMake Install
+#-----------------------------------------------------------------------------
+INSTALL (
+ TARGETS
+ gif2h5
+ hdf2gif
+ RUNTIME DESTINATION
+ bin/tools
+)