Closed mdpiper closed 1 year ago
Rereading the GNUInstallDirs documentation, I see what I did wrong: I need to use the CMAKE_INSTALL_FULL_<dir>
variables in this context, not the CMAKE_INSTALL_<dir>
variables used in the build process. Doing so gives the expected result:
$ cat /Users/mpiper/anaconda3/envs/bmic/lib/pkgconfig/bmic.pc
Name: bmi-c
Description: The Basic Model Interface for C
URL: https://bmi.readthedocs.io
Version: 2.0
Libs: -L/Users/mpiper/anaconda3/envs/bmic/lib -lbmic
Cflags: -I/Users/mpiper/anaconda3/envs/bmic/include
(Maybe this is good because the process of writing the issue made me think about what went wrong.)
The pkg-config file output from CMake,
bmic.pc
, has relative paths:Absolute paths are needed, otherwise downstream packages can't find
bmi.h
.