-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add INTERFACE definition GLEW_NO_GLU for glew_head.h #426
base: master
Are you sure you want to change the base?
Add INTERFACE definition GLEW_NO_GLU for glew_head.h #426
Conversation
Looks good. |
This ignores the generated pkg-config. Lines 158 to 159 in 3da315c
|
@@ -159,6 +159,7 @@ target_link_libraries (glew_s ${GLEW_LIBRARIES}) | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.cmake
for https://github.com/nigels-com/glew/blob/master/auto/src/glew_head.h#L1131Fix microsoft/vcpkg#43641 (comment)
Possible effects: