mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
c502d81a8c
Tested: local linux
65 lines
2.5 KiB
CMake
65 lines
2.5 KiB
CMake
cmake_minimum_required (VERSION 2.8.10)
|
|
PROJECT (HDF5_TOOLS_H5DUMP)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Setup include Directories
|
|
#-----------------------------------------------------------------------------
|
|
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
|
|
|
|
# --------------------------------------------------------------------
|
|
# Add the h5dump executables
|
|
# --------------------------------------------------------------------
|
|
ADD_EXECUTABLE (h5dump
|
|
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c
|
|
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
|
|
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c
|
|
)
|
|
TARGET_NAMING (h5dump ${LIB_TYPE})
|
|
TARGET_C_PROPERTIES (h5dump " " " ")
|
|
TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
SET_TARGET_PROPERTIES (h5dump PROPERTIES FOLDER tools)
|
|
|
|
SET (H5_DEP_EXECUTABLES h5dump)
|
|
|
|
IF (BUILD_TESTING)
|
|
# --------------------------------------------------------------------
|
|
# Add the h5dump test executable
|
|
# --------------------------------------------------------------------
|
|
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
|
ADD_EXECUTABLE (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
|
|
TARGET_NAMING (h5dumpgentest ${LIB_TYPE})
|
|
TARGET_C_PROPERTIES (h5dumpgentest " " " ")
|
|
TARGET_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
|
|
SET_TARGET_PROPERTIES (h5dumpgentest PROPERTIES FOLDER generator/tools)
|
|
|
|
#ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
|
|
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
|
|
|
INCLUDE (CMakeTests.cmake)
|
|
|
|
INCLUDE (CMakeTestsPBITS.cmake)
|
|
|
|
INCLUDE (CMakeTestsXML.cmake)
|
|
ENDIF (BUILD_TESTING)
|
|
|
|
##############################################################################
|
|
##############################################################################
|
|
### I N S T A L L A T I O N ###
|
|
##############################################################################
|
|
##############################################################################
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Rules for Installation of tools using make Install target
|
|
#-----------------------------------------------------------------------------
|
|
|
|
#INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications)
|
|
|
|
INSTALL (
|
|
TARGETS
|
|
h5dump
|
|
RUNTIME DESTINATION
|
|
${HDF5_INSTALL_BIN_DIR}
|
|
COMPONENT
|
|
toolsapplications
|
|
)
|