Add INTERFACE definition GLEW_NO_GLU for glew_head.h#426
Add INTERFACE definition GLEW_NO_GLU for glew_head.h#426WangWeiLin-MV wants to merge 1 commit intonigels-com:masterfrom WangWeiLin-MV:cmake/public-definition/GLEW_NO_GLU
Conversation
|
Looks good. |
|
This ignores the generated pkg-config. Lines 158 to 159 in 3da315c |
|
|
||
| target_compile_definitions(glew_s INTERFACE "GLEW_STATIC") | ||
| foreach(t glew glew_s) | ||
| target_compile_definitions(${t} INTERFACE GLEW_NO_GLU) |
There was a problem hiding this comment.
| target_compile_definitions(${t} INTERFACE GLEW_NO_GLU) | |
| target_compile_definitions(${t} PUBLIC GLEW_NO_GLU) |
and remove the directory-scoped definition instead.
Indeed. There is a nuance with this, from my point of view. The official release of GLEW does indeed continue the (arguably obsolete) The cmake is opt-in and (as I recall the previous discussion) more free to behave in a contemporary, convenient, modernised manner. For modern or new code using cmake and GLEW I do think We could discuss the merits of that nuance in the context of the realities of 2025. But I did want to point out this somewhat convoluted way for compatibility and modernity to coexist reasonably and pragmatically. It's also one reason the two builds continue along side each other, to serve those different needs. Edit: And thanks for the review, always happy to have additional eyes on changes. |
Add public compile definitions to
glew-targets.cmakefor https://github.com/nigels-com/glew/blob/master/auto/src/glew_head.h#L1131Fix microsoft/vcpkg#43641 (comment)
Possible effects: