Since I wanted to use glad as subporject of my project, I wrote this code
add_subdirectory(extern/glad)
...
target_link_libraries(${PROJECT_NAME}
OpenGL::GL
glfw
glad
...
However, GLAD_INCLUDE_DIRS of glad target is set to PRIVATE so that my compiler couldn't find glad/glad.h. After change property from PRIVATE to PUBLIC the problem resolved.
I just wonder why GLAD_INCLUDE_DIRS is set to private
Is there any reason for this?
https://github.com/Dav1dde/glad/blob/ec01ac515dba0730dca375887bb1bd60bc92013c/CMakeLists.txt#L84
To use glad target in other cmake project, I think GLAD_INCLUDE_DIRS should be set to PUBLIC not PRIVATE.
Thanks for the report.
@sfuller any input? I think that code came from you.
Changing private to public sounds like a good fix. I don't think changing it to public will cause any side effects.
Okay. Is there anything that I can do?
Or should I close this issue?
I'll fix it tonight for you :)
Okay
Thanks for fast feedback
:)