2014-03-13 23:05:09 +08:00
|
|
|
cmake_minimum_required (VERSION 2.8.11)
|
2010-05-14 00:01:50 +08:00
|
|
|
PROJECT (HDF5_TOOLS_LIB)
|
|
|
|
|
2012-09-19 06:08:07 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Apply Definitions to compiler in this directory and below
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-05-15 03:50:28 +08:00
|
|
|
add_definitions (${HDF_EXTRA_C_FLAGS})
|
2012-09-19 06:08:07 +08:00
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Sources
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
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
|
2012-02-18 05:41:58 +08:00
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_dump.c
|
2010-08-07 01:53:52 +08:00
|
|
|
${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
|
2015-01-06 00:21:22 +08:00
|
|
|
# ${HDF5_TOOLS_LIB_SOURCE_DIR}/io_timer.c
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
2014-03-12 05:14:57 +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
|
2012-02-18 05:41:58 +08:00
|
|
|
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_dump.h
|
2010-08-07 01:53:52 +08:00
|
|
|
${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
|
|
|
)
|
|
|
|
|
2014-09-04 03:04:18 +08:00
|
|
|
add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
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}")
|
2010-05-14 00:01:50 +08:00
|
|
|
H5_SET_LIB_OPTIONS (
|
|
|
|
${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME}
|
|
|
|
${LIB_TYPE}
|
|
|
|
HDF5_TOOLS_LIB_NAME_RELEASE
|
2011-08-02 03:37:34 +08:00
|
|
|
HDF5_TOOLS_LIB_NAME_DEBUG
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
|
2014-03-26 02:25:53 +08:00
|
|
|
set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES
|
|
|
|
FOLDER libraries/tools
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
|
|
|
)
|
2011-10-25 14:59:10 +08:00
|
|
|
|
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
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add file(s) to CMake Install
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
install (
|
2010-05-14 00:01:50 +08:00
|
|
|
FILES
|
|
|
|
${H5_TOOLS_LIB_HDRS}
|
|
|
|
DESTINATION
|
2011-08-02 03:37:34 +08:00
|
|
|
${HDF5_INSTALL_INCLUDE_DIR}
|
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
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_EXPORTED_TARGETS)
|
|
|
|
if (BUILD_SHARED_LIBS)
|
2014-02-04 23:11:36 +08:00
|
|
|
INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} toolslibraries)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (BUILD_SHARED_LIBS)
|
2012-05-25 05:50:06 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
install (
|
2010-05-14 00:01:50 +08:00
|
|
|
TARGETS
|
|
|
|
${HDF5_TOOLS_LIB_TARGET}
|
|
|
|
EXPORT
|
|
|
|
${HDF5_EXPORTED_TARGETS}
|
2011-08-02 03:37:34 +08:00
|
|
|
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries
|
|
|
|
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries
|
|
|
|
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolslibraries
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (HDF5_EXPORTED_TARGETS)
|