summaryrefslogtreecommitdiffstats
path: root/tools/src/h5ls
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5ls')
-rw-r--r--tools/src/h5ls/CMakeLists.txt21
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt
index 1bc241a..b4e3633 100644
--- a/tools/src/h5ls/CMakeLists.txt
+++ b/tools/src/h5ls/CMakeLists.txt
@@ -16,9 +16,18 @@ target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5ls PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls")
-set (H5_DEP_EXECUTABLES
- h5ls
-)
+set (H5_DEP_EXECUTABLES h5ls)
+
+if (BUILD_SHARED_LIBS)
+ add_executable (h5ls-shared ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
+ TARGET_NAMING (h5ls-shared SHARED)
+ TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ")
+ target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5ls-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5ls-shared)
+endif ()
##############################################################################
##############################################################################
@@ -30,11 +39,13 @@ set (H5_DEP_EXECUTABLES
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
-#INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5ls-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+endif ()
install (
TARGETS
- h5ls
+ ${H5_DEP_EXECUTABLES}
EXPORT
${HDF5_EXPORTED_TARGETS}
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications