I’m trying to create imported targets to consume OpenCL components. Previously the project relied on include_directories()
to specify non-system include directories. However, once I moved to installing components as proper imported targets, when I consume OpenCL::Headers
via target_link_libraries(example1 PRIVATE OpenCL::Headers)
it picks up the system headers from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h
How can I tell either when creating the imported target (which I install) or when I consume it, that it should take precendence over the system include?