Skip to content

Commit f6bf95f

Browse files
committed
install: find HDF5 automatically
packages using h5fortran install no longer need to find HDF5 themselves
1 parent 550ea07 commit f6bf95f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Examples/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ LANGUAGES C CXX Fortran)
55

66
include(CTest)
77

8-
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/Modules)
9-
10-
# --- find external libraries
11-
12-
find_package(HDF5 COMPONENTS Fortran REQUIRED)
13-
14-
# --- Find our library
158
if(NOT h5fortran_ROOT AND NOT DEFINED ENV{h5fortran_ROOT})
169
set(h5fortran_ROOT ${PROJECT_SOURCE_DIR}/../build)
1710
endif()

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.4
1+
3.6.5

cmake/Config.cmake.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@PACKAGE_INIT@
22

3+
include(CMakeFindDependencyMacro)
4+
5+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../Modules)
6+
find_dependency(HDF5 COMPONENTS Fortran)
7+
38
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
49

510
check_required_components(@PROJECT_NAME@)

0 commit comments

Comments
 (0)