2010-05-14 00:01:50 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
PROJECT (HDF5_TOOLS_LIB)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Sources
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
#INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
|
|
|
|
#INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
|
|
|
|
|
|
|
|
SET (H5_TOOLS_LIB_SRCS
|
2010-08-07 01:53:52 +08:00
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_array.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_attr.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_dset.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_util.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_filters.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_ref.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_str.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_type.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_utils.c
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.c
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
SET (H5_TOOLS_LIB_HDRS
|
2010-08-07 01:53:52 +08:00
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.h
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools.h
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_utils.h
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_str.h
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_ref.h
|
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
#-- Always build a static library for linking the ${HDF5_LIB_NAME} tools together
|
|
|
|
ADD_LIBRARY (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
|
|
|
|
TARGET_LINK_LIBRARIES (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
|
|
|
SET_GLOBAL_VARIABLE( HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
|
|
|
|
H5_SET_LIB_OPTIONS (
|
|
|
|
${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME}
|
|
|
|
${LIB_TYPE}
|
|
|
|
HDF5_TOOLS_LIB_NAME_RELEASE
|
|
|
|
HDF5_TOOLS_LIB_NAME_DEBUG
|
|
|
|
)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add file(s) to CMake Install
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
INSTALL (
|
|
|
|
FILES
|
|
|
|
${H5_TOOLS_LIB_HDRS}
|
|
|
|
DESTINATION
|
|
|
|
include/tools
|
2010-05-20 04:11:00 +08:00
|
|
|
COMPONENT
|
|
|
|
toolsheaders
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add Target(s) to CMake Install for import into other projects
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
IF (HDF5_EXPORTED_TARGETS)
|
|
|
|
INSTALL (
|
|
|
|
TARGETS
|
|
|
|
${HDF5_TOOLS_LIB_TARGET}
|
|
|
|
EXPORT
|
|
|
|
${HDF5_EXPORTED_TARGETS}
|
2010-05-20 04:11:00 +08:00
|
|
|
LIBRARY DESTINATION lib/tools COMPONENT toolslibraries
|
|
|
|
ARCHIVE DESTINATION lib/tools COMPONENT toolslibraries
|
|
|
|
RUNTIME DESTINATION bin/tools COMPONENT toolslibraries
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
ENDIF (HDF5_EXPORTED_TARGETS)
|