Develop cmake install dir (#1041)

* Corrected path searched by CMake find_package command

* Correct path for depend libs

* Adjust examples script for install path
This commit is contained in:
Allen Byrne 2021-09-28 08:00:37 -05:00 committed by GitHub
parent ecb3383c8d
commit 516d967710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 9 deletions

View File

@ -31,7 +31,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_EXPORTED_TARGETS)
install (
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
NAMESPACE ${HDF_PACKAGE_NAMESPACE}
COMPONENT configinstall
@ -72,7 +72,7 @@ set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
)
@ -86,14 +86,14 @@ set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5"
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif ()
@ -113,7 +113,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
#)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif ()

View File

@ -83,7 +83,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
###############################################################################################################
if(WIN32)
set(SITE_OS_NAME "Windows")
set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")

View File

@ -113,12 +113,12 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@)
#-----------------------------------------------------------------------------
if (NOT TARGET "@HDF5_PACKAGE@")
if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
include (@PACKAGE_SHARE_INSTALL_DIR@/@SZ_PACKAGE_NAME@/@SZ_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
include (@PACKAGE_SHARE_INSTALL_DIR@/@SZ_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
# Handle default component(static) :

View File

@ -1172,6 +1172,15 @@ Bug Fixes since HDF5-1.12.0 release
Configuration
-------------
- Corrected path searched by CMake find_package command
The install path for cmake find_package files had been changed to use
"share/cmake"
for all platforms. However the trailing "hdf5" directory was not removed.
This "hdf5" additional directory has been removed.
(ADB - 2021/09/27)
- Corrected pkg-config compile script
It was discovered that the position of the "$@" argument for the command