diff options
-rw-r--r-- | tools/src/h5repack/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index 2d3459d..243df6c 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -29,6 +29,17 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack") set (H5_DEP_EXECUTABLES h5repack) +if (BUILD_SHARED_LIBS) + add_executable (h5repack-shared ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c) + TARGET_NAMING (h5repack-shared SHARED "dyn") + TARGET_C_PROPERTIES (h5repack-shared SHARED " " " ") + target_link_libraries (h5repack-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (h5repack-shared PROPERTIES FOLDER tools) + set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack-shared") + + set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5repack-shared) +endif () + ############################################################################## ############################################################################## ### I N S T A L L A T I O N ### @@ -39,11 +50,11 @@ set (H5_DEP_EXECUTABLES h5repack) # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- -#INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications) +INSTALL_PROGRAM_PDB (h5repack-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) install ( TARGETS - h5repack + ${H5_DEP_EXECUTABLES} EXPORT ${HDF5_EXPORTED_TARGETS} RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications |