summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-02-17 22:17:58 (GMT)
committerGitHub <noreply@github.com>2023-02-17 22:17:58 (GMT)
commit593484fa0ee30e42a7b735e6a08744b736885d11 (patch)
tree1f6ccc0045fc12aa1957178efd75713e1239d3d3 /src
parent606dc11623b57987d77a7640b8687d2f6df6abda (diff)
downloadhdf5-593484fa0ee30e42a7b735e6a08744b736885d11.zip
hdf5-593484fa0ee30e42a7b735e6a08744b736885d11.tar.gz
hdf5-593484fa0ee30e42a7b735e6a08744b736885d11.tar.bz2
1.12 Merge Correct pkgconfig variables and libraries #2259 (#2478)
* Merge Correct pkgconfig variables and libraries #2259 * Fix spacing
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c6294c4..e74cbb1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1292,20 +1292,30 @@ set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${HDF5_INSTALL_LIB_DIR})
set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${HDF5_INSTALL_INCLUDE_DIR})
set (_PKG_CONFIG_LIBNAME "${HDF5_LIB_CORENAME}")
set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+set (PKGCONFIG_LIBNAME "${HDF5_LIB_CORENAME}")
+if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
+ set (PKGCONFIG_LIBNAME "${PKGCONFIG_LIBNAME}${CMAKE_DEBUG_POSTFIX}")
+endif ()
+
+foreach (libs ${LINK_LIBS})
+ set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libs}")
+endforeach ()
-foreach (libs ${LINK_LIBS} ${LINK_COMP_LIBS})
+# The settings for the compression libs depends on if they have pkconfig support
+# Assuming they don't
+foreach (libs ${LINK_COMP_LIBS})
+# set (_PKG_CONFIG_REQUIRES_PRIVATE "${_PKG_CONFIG_REQUIRES_PRIVATE} -l${libs}")
set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libs}")
endforeach ()
if (NOT ONLY_SHARED_LIBS)
- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_LIB_CORENAME}")
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKGCONFIG_LIBNAME}")
endif ()
if (BUILD_SHARED_LIBS)
- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_LIB_CORENAME}")
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${PKGCONFIG_LIBNAME}")
endif ()
set (_PKG_CONFIG_REQUIRES)
-set (_PKG_CONFIG_REQUIRES_PRIVATE)
configure_file (
${HDF_CONFIG_DIR}/libhdf5.pc.in