How to add project's name under "include" in installed location using CMake

Viewed 20

I'm building PyTorch (which uses CMake) and it installs its header files and folders directly inside the include directory. I'd like it to install the headers in a subdirectory of the include directory, named pytorch (or for my needs, libtorch).

Actual:

+- include
   +- torch
      +- library.h
      +- ...

Desired:

+- include
   +- pytorch
      +- torch
         +- library.h
         +- ...

Most other libraries I've built do this which is nice because it keeps the files organized.

How can I accomplish this with CMake?

0 Answers
Related