Library Targets Include Directories Broken
Author: dipustmCreated Oct 8, 2025Updated Oct 8, 2025
Labelsbuglow prioritycmake
Hi folks, when using the draco library as a subproject, or with CMake's FetchContent machinery, the draco includes are broken. This stems from the definition of the draco_add_library macro. It is not able to find the headers and generated file(draco/draco_features.h header).
I have done the work around like below:- target_include_directories(draco_static PUBLIC $<BUILD_INTERFACE:${draco_SOURCE_DIR}/src> $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> )
But this way we are exposing the entire draco source code to consumer. Does anyone know better solution for this?
Source: google/draco