diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-05-04 15:54:31 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-05-04 15:54:31 (GMT) |
commit | 2d36359035b0b17a45ab2cb5721fb7623a21b564 (patch) | |
tree | b158d7e6fe4f747325a18794c9029bd66b4ffd6a /hl/tools | |
parent | f1633a5fe2fa339657716fc557cc93be61fe766f (diff) | |
download | hdf5-2d36359035b0b17a45ab2cb5721fb7623a21b564.zip hdf5-2d36359035b0b17a45ab2cb5721fb7623a21b564.tar.gz hdf5-2d36359035b0b17a45ab2cb5721fb7623a21b564.tar.bz2 |
[svn-r29874] Move hl/tools/gif2h5 CMake code to subfolder.
Diffstat (limited to 'hl/tools')
-rw-r--r-- | hl/tools/CMakeLists.txt | 64 | ||||
-rw-r--r-- | hl/tools/gif2h5/CMakeLists.txt | 64 | ||||
-rw-r--r-- | hl/tools/gif2h5/CMakeTests.cmake (renamed from hl/tools/CMakeTests.cmake) | 8 |
3 files changed, 70 insertions, 66 deletions
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 73d1f22..560b1f2 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,64 +1,4 @@ cmake_minimum_required (VERSION 3.1.0) -PROJECT (HDF5_HL_TOOLS) +PROJECT (HDF5_HL_TOOLS C CXX) -#----------------------------------------------------------------------------- -# Define Sources -#----------------------------------------------------------------------------- -set (GIF2H5_SRCS - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif.h - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/decompress.c - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif2hdf.c - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif2mem.c - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gifread.c - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/writehdf.c -) - -#-- Add gif2hdf5 program -INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) -INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5) - -add_executable (gif2h5 ${GIF2H5_SRCS}) -TARGET_NAMING (gif2h5 STATIC) -TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") -target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) -set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) - -#-- Add h52gif program -set (hdf2gif_SRCS - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdf2gif.c - ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdfgifwr.c -) -add_executable (h52gif ${hdf2gif_SRCS}) -TARGET_NAMING (h52gif STATIC) -TARGET_C_PROPERTIES (h52gif STATIC " " " ") -target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) -set_target_properties (h52gif PROPERTIES FOLDER tools/hl) - -if (BUILD_TESTING) - # -------------------------------------------------------------------- - # This executable can generate the actual test files - Currently not - # used in the CMake Build system as we rely on the test files that are - # shipped with HDF5 source archives - # -------------------------------------------------------------------- - if (HDF5_BUILD_GENERATORS) - add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c) - TARGET_NAMING (hl_h52gifgentest STATIC) - TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") - target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) - set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) - -# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>) - endif (HDF5_BUILD_GENERATORS) - - include (CMakeTests.cmake) -endif (BUILD_TESTING) - -#----------------------------------------------------------------------------- -# Add file(s) to CMake Install -#----------------------------------------------------------------------------- -install ( - TARGETS - gif2h5 - h52gif - RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications -) +add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5 ${HDF5_HL_TOOLS_BINARY_DIR}/gif2h5) diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt new file mode 100644 index 0000000..3a55501 --- /dev/null +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -0,0 +1,64 @@ +cmake_minimum_required (VERSION 3.1.0) +PROJECT (HDF5_HL_TOOLS_GIF2H5) + +#----------------------------------------------------------------------------- +# Define Sources +#----------------------------------------------------------------------------- +set (GIF2H5_SOURCES + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif.h + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/decompress.c + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif2hdf.c + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif2mem.c + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gifread.c + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/writehdf.c +) + +#-- Add gif2hdf5 program +INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) +INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}) + +add_executable (gif2h5 ${GIF2H5_SOURCES}) +TARGET_NAMING (gif2h5 STATIC) +TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") +target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) + +#-- Add h52gif program +set (hdf2gif_SOURCES + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c + ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c +) +add_executable (h52gif ${hdf2gif_SOURCES}) +TARGET_NAMING (h52gif STATIC) +TARGET_C_PROPERTIES (h52gif STATIC " " " ") +target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +set_target_properties (h52gif PROPERTIES FOLDER tools/hl) + +if (BUILD_TESTING) + # -------------------------------------------------------------------- + # This executable can generate the actual test files - Currently not + # used in the CMake Build system as we rely on the test files that are + # shipped with HDF5 source archives + # -------------------------------------------------------------------- + if (HDF5_BUILD_GENERATORS) + add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c) + TARGET_NAMING (hl_h52gifgentest STATIC) + TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ") + target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) + set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) + +# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>) + endif (HDF5_BUILD_GENERATORS) + + include (CMakeTests.cmake) +endif (BUILD_TESTING) + +#----------------------------------------------------------------------------- +# Add file(s) to CMake Install +#----------------------------------------------------------------------------- +install ( + TARGETS + gif2h5 + h52gif + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hltoolsapplications +) diff --git a/hl/tools/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake index 4ebd7a2..832d2df 100644 --- a/hl/tools/CMakeTests.cmake +++ b/hl/tools/gif2h5/CMakeTests.cmake @@ -16,28 +16,28 @@ add_custom_command ( TARGET gif2h5 POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif + ARGS -E copy_if_different ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif ) add_custom_command ( TARGET h52gif POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/h52giftst.h5 ${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5 + ARGS -E copy_if_different ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/h52giftst.h5 ${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5 ) add_custom_command ( TARGET h52gif POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/ex_image2.h5 ${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5 + ARGS -E copy_if_different ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5 ${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5 ) # Remove any output file left over from previous test run add_test ( NAME HL_TOOLS-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove image1.gif image1.h5 image.gif |