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_TOOLS_H5REPACK)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Setup include Directories
|
|
|
|
#-----------------------------------------------------------------------------
|
2010-09-01 04:15:13 +08:00
|
|
|
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
|
|
|
|
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
2010-08-26 06:33:59 +08:00
|
|
|
# Add h5Repack executables
|
2010-05-14 00:01:50 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
SET (REPACK_COMMON_SRCS
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_copy.c
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_filters.c
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_opttable.c
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_parse.c
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_refs.c
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_verify.c
|
|
|
|
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack.c
|
|
|
|
)
|
2010-09-01 04:15:13 +08:00
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
ADD_EXECUTABLE (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5repack ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5repack " " " ")
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
2011-10-26 00:52:58 +08:00
|
|
|
SET_TARGET_PROPERTIES (h5repack PROPERTIES FOLDER tools)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
SET (H5_DEP_EXECUTABLES h5repack)
|
|
|
|
|
|
|
|
IF (BUILD_TESTING)
|
2010-08-26 06:33:59 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Add h5Repack test executables
|
|
|
|
# --------------------------------------------------------------------
|
2010-05-14 00:01:50 +08:00
|
|
|
ADD_EXECUTABLE (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (testh5repack_detect_szip " " " ")
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
|
2011-10-26 00:52:58 +08:00
|
|
|
SET_TARGET_PROPERTIES (testh5repack_detect_szip PROPERTIES FOLDER tools)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
ADD_EXECUTABLE (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5repacktest ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5repacktest " " " ")
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
|
2011-10-26 00:52:58 +08:00
|
|
|
SET_TARGET_PROPERTIES (h5repacktest PROPERTIES FOLDER tools)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2013-08-20 05:49:44 +08:00
|
|
|
INCLUDE (CMakeTests.cmake)
|
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
|
|
|
|
#-----------------------------------------------------------------------------
|
2012-05-25 05:50:06 +08:00
|
|
|
|
2012-08-29 01:39:30 +08:00
|
|
|
#INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications)
|
2012-05-25 05:50:06 +08:00
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
INSTALL (
|
|
|
|
TARGETS
|
|
|
|
h5repack
|
|
|
|
RUNTIME DESTINATION
|
2012-06-20 22:43:02 +08:00
|
|
|
${HDF5_INSTALL_BIN_DIR}
|
2010-05-20 04:11:00 +08:00
|
|
|
COMPONENT
|
|
|
|
toolsapplications
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|