diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-02-17 22:17:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 22:17:17 (GMT) |
commit | 32a54c0e2e836a9d7818cf6adfd4f0259ae2cb59 (patch) | |
tree | 9df84ff3b92725a14879e4e0ed93986ac2071ab0 /fortran | |
parent | 0cc028a36c47b3ba75db3a15e5196f08e8094c72 (diff) | |
download | hdf5-32a54c0e2e836a9d7818cf6adfd4f0259ae2cb59.zip hdf5-32a54c0e2e836a9d7818cf6adfd4f0259ae2cb59.tar.gz hdf5-32a54c0e2e836a9d7818cf6adfd4f0259ae2cb59.tar.bz2 |
CMake generated pkg-config file is incorrect #2259 (#2476)
* CMake generated pkg-config file is incorrect #2259
* Fix fortran pc template
* hdf5.pc is incorrect for debug builds #1546
* Correct pkg name and lib name
* Fix typo
* Fix missing space
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index df246fc..35b47a5 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -545,14 +545,18 @@ set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${HDF5_INSTALL_INCLUDE_DIR}) set (_PKG_CONFIG_MODULEDIR \${prefix}/${HDF5_INSTALL_MODULE_DIR}) set (_PKG_CONFIG_LIBNAME "${HDF5_F90_LIB_CORENAME}") set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}") +set (PKG_CONFIG_LIBNAME "${HDF5_F90_LIB_CORENAME}") +if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer") + set (PKG_CONFIG_LIBNAME "${PKG_CONFIG_LIBNAME}${CMAKE_DEBUG_POSTFIX}") +endif () set (_PKG_CONFIG_LIBS_PRIVATE) if (NOT ONLY_SHARED_LIBS) - set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_F90_LIB_CORENAME}") + set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKG_CONFIG_LIBNAME}") endif () if (BUILD_SHARED_LIBS) - set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_F90_LIB_CORENAME}") + set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${PKG_CONFIG_LIBNAME}") endif () set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") |