Skip to content

Installation targets do not carry forward the include directory #187

@eyalroz

Description

@eyalroz

When performing a cmake install after building the repository, the resulting cmake config file exposes targets which do not indicate any include directories.

This is due to the use of the following command:

include_directories(BEFORE SYSTEM ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})

this has two problems:

  1. It is directory-scope rather than target-scope
  2. It only regards directories visible during the build, not following installation.

Instead, we should use target_include_directories() and generator expressions to distinguish build-time and post-install directories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions