Reflect CMAKE_INSTALL_INCLUDEDIR in pkg-config

This commit is contained in:
Alexander Shpilkin
2022-05-19 17:49:16 +03:00
parent afb69071d5
commit 876880fb3f
2 changed files with 6 additions and 1 deletions

View File

@@ -298,6 +298,11 @@ if(SPDLOG_INSTALL)
# ---------------------------------------------------------------------------------------
# Install pkg-config file
# ---------------------------------------------------------------------------------------
if (IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
set(PKG_CONFIG_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(PKG_CONFIG_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()
if (IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
set(PKG_CONFIG_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
else()