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_H5COPY)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# 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
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Add the h5copy and test executables
|
|
|
|
# --------------------------------------------------------------------
|
2014-09-04 03:04:18 +08:00
|
|
|
add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
|
|
|
|
TARGET_NAMING (h5copy ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5copy " " " ")
|
2014-09-04 03:04:18 +08:00
|
|
|
target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
|
2014-03-12 05:14:57 +08:00
|
|
|
set_target_properties (h5copy PROPERTIES FOLDER tools)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
set (H5_DEP_EXECUTABLES h5copy)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (BUILD_TESTING)
|
|
|
|
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
|
|
|
add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
|
2011-02-25 03:43:07 +08:00
|
|
|
TARGET_NAMING (h5copygentest ${LIB_TYPE})
|
2013-06-11 01:46:48 +08:00
|
|
|
TARGET_C_PROPERTIES (h5copygentest " " " ")
|
2014-03-12 05:14:57 +08:00
|
|
|
target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
|
|
|
|
set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 06:07:13 +08:00
|
|
|
#add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
include (CMakeTests.cmake)
|
|
|
|
endif (BUILD_TESTING)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2010-08-26 06:33:59 +08:00
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### I N S T A L L A T I O N ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
2014-04-26 05:27:37 +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 (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
|
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
|
|
|
|
h5copy
|
|
|
|
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
|
|
|
)
|