EmilDohne / PhotoshopAPI

A modern and performant C++20 read/write parser of Photoshop Files (*.psd and *.psb) with fully fledged Python bindings hosted on PyPi
https://photoshopapi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
94 stars 9 forks source link

When submoduling via CMake we get the error "Cannot include blosc2.h" #60

Closed EmilDohne closed 6 months ago

EmilDohne commented 6 months ago

This is due to the way we construct our include for the PhotoshopAPI target

target_include_directories(PhotoshopAPI PUBLIC include ${CMAKE_SOURCE_DIR}/thirdparty/c-blosc2/include src src/Util)

where a better approach would be to add an INTERFACE target for the include dirs in our top level build and not rely on ${CMAKE_SOURCE_DIR} but instead ${CMAKE_PROJECT_DIR}

This could look a little something like this:

add_library(blosc2_include INTERFACE)
target_include_directories(blosc2_include INTERFACE thirdparty/c-blosc_2/include )