Upgrade CMake installation
To ease integration of PMT into other projects, a proper pmt-config.cmake
needs to be installed at make install
time. This required some changes to the CMake files. A user is now expected to use find_package(pmt)
, #include <pmt.h>
and subsequently target_link_libraries(<target_name> pmt)
to integrate PMT.
There are two changes that potentially compatibility breaking changes:
- The "helper" header files are now installed in
<prefix>/include/pmt
, only the essential header files are directly in<prefix>/include
. -
GNUInstallDirs is used to determine installation directories, so the Python bindings are now longer in
lib
, but rather inlib64
(or any other platform-dependent directory).
For a follow-up MR, it may be nice to introduce components. Now a user is expected to build PMT with all the backends they need and end up with one libpmt.so
which supports all. It might be nice to have support for CMake stuff like find_package(pmt COMPONENTS nvml)
with pmt::nvml
.
Edited by Bram Veenboer