Skip to content

Install header directory preserving the original hierarchy #8

Open
@claudiofantacci

Description

@claudiofantacci

The current version of the LibTemplateCmake CMakeLists.txt uses PUBLIC_HEADER to list and install the header of the library.
While this approach is clean and straightforward, the process does not preserve the header folder hierarchy and, instead, install all header files in the same directory.

A simple workaround is to delete PUBLIC_HEADER property and use a install(DIRECTORY /path/of/include/dir DESTINATION /install/path/of/include/dir).

Is this solution sufficiently clean and satisfactory for most of the situation?
While this solution works smoothly, it undermines how to (I quote):

Specify public header files in a FRAMEWORK shared library target.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions