File tree Expand file tree Collapse file tree 5 files changed +18
-14
lines changed Expand file tree Collapse file tree 5 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ include(CMakeFindDependencyMacro)
44
55list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} )
66
7- find_dependency(HDF5 1.8.7 COMPONENTS Fortran)
7+ find_dependency(HDF5 COMPONENTS Fortran)
88
99include (${CMAKE_CURRENT_LIST_DIR} /@PROJECT_NAME @-targets.cmake)
1010
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ ExternalProject_Add(H5FORTRAN
2929SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} /..
3030CMAKE_ARGS ${h5fortran_cmake_args}
3131BUILD_BYPRODUCTS ${h5fortran_LIBRARIES}
32- INACTIVITY_TIMEOUT 15
3332CONFIGURE_HANDLED_BY_BUILD ON
3433DEPENDS HDF5::HDF5
3534)
Original file line number Diff line number Diff line change 33include (CMakePackageConfigHelpers)
44
55configure_package_config_file(${CMAKE_CURRENT_LIST_DIR} /config.cmake.in
6- ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} -config .cmake
6+ ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} Config .cmake
77INSTALL_DESTINATION cmake
88)
99
1010write_basic_package_version_file(
11- ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} -config- version .cmake
11+ ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} ConfigVersion .cmake
1212COMPATIBILITY SameMinorVersion
1313)
1414
@@ -18,8 +18,8 @@ DESTINATION cmake
1818)
1919
2020install (FILES
21- ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} -config .cmake
22- ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} -config- version .cmake
21+ ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} Config .cmake
22+ ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${PROJECT_NAME} ConfigVersion .cmake
2323DESTINATION cmake
2424)
2525
Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ endif()
2020
2121cmake_path(SET CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /Modules)
2222
23- if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
24- # will not take effect without FORCE
25- # CMAKE_BINARY_DIR in case it's used from FetchContent
26- set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH "Install top-level directory" FORCE)
27- endif ()
28-
2923# Rpath options necessary for shared library install to work correctly in user projects
3024set (CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX} /lib)
3125set (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX} /lib)
@@ -34,6 +28,17 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
3428# Necessary for shared library with Visual Studio / Windows oneAPI
3529set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true )
3630
31+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
32+ # will not take effect without FORCE
33+ # CMAKE_BINARY_DIR for use from FetchContent
34+ set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH "Install top-level directory" FORCE)
35+ endif ()
36+
37+ # allow CMAKE_PREFIX_PATH with ~ expand
38+ if (CMAKE_PREFIX_PATH )
39+ get_filename_component (CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ABSOLUTE )
40+ endif ()
41+
3742# --- auto-ignore build directory
3843if (NOT EXISTS ${PROJECT_BINARY_DIR} /.gitignore)
3944 file (WRITE ${PROJECT_BINARY_DIR} /.gitignore "*" )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ URL_HASH SHA256=${zlib_sha256}
4444CMAKE_ARGS ${zlib_cmake_args}
4545BUILD_BYPRODUCTS ${ZLIB_LIBRARIES}
4646CONFIGURE_HANDLED_BY_BUILD ON
47- INACTIVITY_TIMEOUT 15
47+ INACTIVITY_TIMEOUT 60
4848)
4949else ()
5050ExternalProject_Add(ZLIB
@@ -54,7 +54,7 @@ GIT_SHALLOW true
5454CMAKE_ARGS ${zlib_cmake_args}
5555BUILD_BYPRODUCTS ${ZLIB_LIBRARIES}
5656CONFIGURE_HANDLED_BY_BUILD ON
57- INACTIVITY_TIMEOUT 15
57+ INACTIVITY_TIMEOUT 60
5858)
5959endif ()
6060
You can’t perform that action at this time.
0 commit comments