@@ -162,8 +162,8 @@ endif()
162162file (COPY ${CMAKE_SOURCE_DIR} /data/ DESTINATION ${HC_BUILD_DATA} )
163163message (STATUS " copied to: ${HC_BUILD_DATA} /" )
164164
165- # Install data directory
166- install (DIRECTORY ${HC_BUILD_DATA} DESTINATION ${HC_INSTALL_DATA} )
165+ # Install data directory (trailing slash copies contents, not the directory itself)
166+ install (DIRECTORY ${HC_BUILD_DATA} / DESTINATION ${HC_INSTALL_DATA} )
167167message (STATUS " installed to: ${CMAKE_INSTALL_PREFIX} /${HC_INSTALL_DATA} /" )
168168
169169# -- Output Directory Structure --
@@ -663,14 +663,45 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
663663 endif ()
664664 endforeach ()
665665
666- # HDF5 DLLs
666+ # HDF5 DLLs - use glob to find all DLLs in HDF5 bin directory
667+ if (DEFINED HDF5_ROOT OR DEFINED HDF5_DIR)
668+ # Determine HDF5 root from various possible variables
669+ if (DEFINED HDF5_ROOT)
670+ set (_hdf5_root "${HDF5_ROOT} " )
671+ elseif (DEFINED HDF5_DIR)
672+ # HDF5_DIR might point to share/cmake/hdf5 or similar
673+ get_filename_component (_hdf5_root "${HDF5_DIR} " DIRECTORY )
674+ get_filename_component (_hdf5_root "${_hdf5_root} " DIRECTORY )
675+ get_filename_component (_hdf5_root "${_hdf5_root} " DIRECTORY )
676+ endif ()
677+
678+ set (_hdf5_bin "${_hdf5_root} /bin" )
679+ if (EXISTS "${_hdf5_bin} " )
680+ file (GLOB _hdf5_dlls "${_hdf5_bin} /*.dll" )
681+ if (_hdf5_dlls)
682+ message (STATUS "Installing HDF5 DLLs from: ${_hdf5_bin} " )
683+ install (FILES ${_hdf5_dlls} DESTINATION bin COMPONENT runtime )
684+ endif ()
685+ endif ()
686+ endif ()
687+
688+ # Also try target-based approach as fallback
667689 foreach (tgt ${HDF5_TARGETS} )
668690 get_target_property (tgt_DLL ${tgt} IMPORTED_LOCATION_RELEASE )
669691 if (EXISTS ${tgt_DLL} )
670692 install (FILES ${tgt_DLL} DESTINATION bin COMPONENT runtime )
671693 endif ()
672694 endforeach ()
673695
696+ # Irrlicht DLL
697+ if (HYDROCHRONO_ENABLE_IRRLICHT AND DEFINED Irrlicht_ROOT)
698+ set (_irr_dll "${Irrlicht_ROOT} /bin/Win64-VisualStudio/Irrlicht.dll" )
699+ if (EXISTS "${_irr_dll} " )
700+ message (STATUS "Installing Irrlicht.dll from: ${_irr_dll} " )
701+ install (FILES "${_irr_dll} " DESTINATION bin COMPONENT runtime )
702+ endif ()
703+ endif ()
704+
674705 # Python DLLs, if Chrono::Parsers depends on it
675706 if (CHRONO_PARSERS_PYTHON)
676707 find_package (Python3 QUIET COMPONENTS Interpreter Development )
@@ -694,6 +725,13 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/tests/regression/run_hydrochrono
694725 PATTERN "__pycache__" EXCLUDE
695726 PATTERN "*.pyc" EXCLUDE)
696727
728+ # Install test input data (YAML configs, hydro data, geometry) into tests/run_hydrochrono
729+ # The Python scripts expect test case folders (iea_sphere/, oswec/, rm3/, f3of/) to be siblings
730+ install (DIRECTORY ${PROJECT_SOURCE_DIR} /data/demos/run_hydrochrono/
731+ DESTINATION tests/run_hydrochrono COMPONENT python-tests
732+ PATTERN "__pycache__" EXCLUDE
733+ PATTERN "*.pyc" EXCLUDE)
734+
697735# Simple runner script to execute tests from the installed tree
698736install (PROGRAMS ${PROJECT_SOURCE_DIR} /scripts/RUN-TESTS.ps1
699737 DESTINATION tests COMPONENT python-tests)
0 commit comments