2010-05-14 00:01:50 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
PROJECT (HDF5_TOOLS_H5JAM)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Setup include Directories
|
|
|
|
#-----------------------------------------------------------------------------
|
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_PROJECT_DIR}/test)
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
2010-08-26 06:33:59 +08:00
|
|
|
# Add the h5jam executables
|
2010-05-14 00:01:50 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
ADD_EXECUTABLE (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5jam ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
|
|
|
|
ADD_EXECUTABLE (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (getub ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
|
|
|
|
ADD_EXECUTABLE (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (tellub ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
|
|
|
|
ADD_EXECUTABLE (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5unjam ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
|
|
|
|
SET (H5_DEP_EXECUTABLES
|
|
|
|
h5jam
|
|
|
|
getub
|
|
|
|
tellub
|
|
|
|
h5unjam
|
|
|
|
)
|
|
|
|
|
2010-08-26 06:33:59 +08:00
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### T E S T I N G ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
IF (BUILD_TESTING)
|
2010-08-26 06:33:59 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Add the h5jam test executables
|
|
|
|
# --------------------------------------------------------------------
|
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 (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5jamgentest ${LIB_TYPE})
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (h5jamgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
|
|
|
|
|
|
#ADD_TEST (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
|
2010-09-01 04:15:13 +08:00
|
|
|
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
2010-08-26 06:33:59 +08:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### T H E T E S T S M A C R O S ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### T H E T E S T S ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
ENDIF (BUILD_TESTING)
|
|
|
|
|
2010-08-26 06:33:59 +08:00
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### I N S T A L L A T I O N ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Rules for Installation of tools using make Install target
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
INSTALL (
|
|
|
|
TARGETS
|
|
|
|
h5jam h5unjam
|
|
|
|
RUNTIME DESTINATION
|
2010-09-21 04:38:35 +08:00
|
|
|
${HDF5_INSTALL_BIN_DIR}/tools
|
2010-05-20 04:11:00 +08:00
|
|
|
COMPONENT
|
|
|
|
toolsapplications
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|