cmake: Use GNUInstallDirs for install paths and install pc file (#317)

This ensures that the correct include and library directories are used
regardless of operating system target by leveraging the built-in
GNUInstallDirs logic for determining the right directory paths.

This also fixes the path for the CMake config module files to use
the right location for header-only libraries.

A pc(5) file for pkgconfig is now also created and installed.
This commit is contained in:
Neal Gompa (ニール・ゴンパ)
2025-11-09 05:55:32 -05:00
committed by GitHub
parent 7d1b4600b6
commit ebb7aeb3ae
2 changed files with 17 additions and 3 deletions

5
cmake/config/inja.pc.in Normal file
View File

@@ -0,0 +1,5 @@
Name: inja
Description: @PROJECT_DESCRIPTION@
URL: https://github.com/pantor/inja
Version: @PROJECT_VERSION@
Requires: nlohmann_json