Skip to content

Include path not exposed while importing to CMake project via FetchContent #69

@francisco-m-almeida

Description

@francisco-m-almeida

While importing tinyply to a CMake project through FetchContent in such a way,

FetchContent_Declare(tinyply
		GIT_REPOSITORY  https://github.com/ddiakopoulos/tinyply.git
		GIT_TAG 2.3.4
)
FetchContent_MakeAvailable(tinyply)

The header tinyply.h is not found by the compiler, as if the source subdirectory was not added to include path.

The workaround I am currently using is adding the include path by hand thus:

target_include_directories(${MY_TARGET} PRIVATE "${tinyply_SOURCE_DIR}/source")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions