Skip to content

Fix pkg-config file's includedir variable

  1. INCLUDE_INSTALL_DIR was being defined in too low of a scope for the top-level configure_file call to access it, resulting in an includedir of just ${prefix}. Fix this by moving its definition to the top-level CMakeLists.

  2. INCLUDE_INSTALL_DIR was using include instead of the actual GNUInstallDirs variable that points at the requested location. Fix this by switching to the corresponding variable. Additionally, CMAKE_INSTALL_*DIR variables can have full paths, so just prepending ${prefix} to it can result in nonsense paths. So we use the FULL variant of the variable and also remove the ${prefix}, setting includedir to just INCLUDE_INSTALL_DIR.

Merge request reports