swami / libinstpatch

Instrument file software library.
Other
20 stars 6 forks source link

Use GNUInstallDirs for installation paths #69

Closed h3xx closed 1 year ago

h3xx commented 1 year ago

Replace path-guessing system with GNUInstallDirs which provides override-able sane defaults. To override, pass them in, e.g. -DCMAKE_INSTALL_LIBDIR=foo.

Also use these variables for .pc substitutions. CMAKE_INSTALL_FULL_* being the full path equivalent to the prefixed version without FULL.

This removes the old options.

More information about GNUInstallDirs: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

h3xx commented 1 year ago

I left it out because YAGNI. I couldn't find anywhere it was depending on that variable. Perhaps you can think of a place it reads that variable.

pkg-config --variable=exec_prefix libinstpatch-1.0 is the only supported way of reading the variable. It now returns an empty string instead of "/usr" and perhaps this is a breaking change. Not sure what if anything runs that command, though.

Sure, I'll just hard code it to fill it in. -- "If I am to be judged by those who come after me, let me be judged for the truth." — Raistlin Majere