diff options
Diffstat (limited to 'tools/h5dump/CMakeLists.txt')
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index c81765c..3a91e54 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -22,6 +22,21 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump") set (H5_DEP_EXECUTABLES h5dump) +if (BUILD_SHARED_LIBS) + add_executable (h5dump-shared + ${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-shared SHARED) + TARGET_C_PROPERTIES (h5dump-shared SHARED " " " ") + target_link_libraries (h5dump-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (h5dump-shared PROPERTIES FOLDER tools) + set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump-shared") + + set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5dump-shared) +endif () + if (BUILD_TESTING) #----------------------------------------------------------------------------- @@ -70,7 +85,7 @@ if (BUILD_TESTING) include (CMakeTestsPBITS.cmake) include (CMakeTestsXML.cmake) -endif (BUILD_TESTING) +endif () ############################################################################## ############################################################################## @@ -81,13 +96,17 @@ endif (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- - -#INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications) - -install ( - TARGETS - h5dump - EXPORT - ${HDF5_EXPORTED_TARGETS} - RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications -) +if (HDF5_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_PROGRAM_PDB (h5dump-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endif () + INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications) + + install ( + TARGETS + ${H5_DEP_EXECUTABLES} + EXPORT + ${HDF5_EXPORTED_TARGETS} + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications + ) +endif () |