-
Notifications
You must be signed in to change notification settings - Fork 87
Specify dependencies on object library targets #282
base: master
Are you sure you want to change the base?
Conversation
The minimum CMake version was updated to 3.12 in minetest#270. This cleans up the build using the feature to use target_link_libraries on object library targets that was added in CMake 3.12. It has been tested on Linux with OpenGL. I will test it with more settings and on more systems as the work progresses.
<$BUILD_INTERFACE:IRROBJ> | ||
<$BUILD_INTERFACE:IRROTHEROBJ> | ||
<$BUILD_INTERFACE:IRRVIDEOOBJ> |
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.
This is not a portable solution. I will probably end up including these in the export for the time being.
Can’t you just replace |
I'm planning to try that. I expect it may work, but I was also concerned that it might resolve the symbols but not include them in the archive. That would require the .o files to be installed, and that's not what we want, right? 🙂 |
) | ||
|
||
if(USE_X11) | ||
target_include_directories(IRRVIDEOOBJ PUBLIC "${X11_INCLUDE_DIR}") |
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.
this could be a generator expression instead
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.
That will be obsolete, though, once I change it to use a target.
"$<$<BOOL:${OPENGLES2_DIRECT_LINK}>:${OPENGLES2_LIBRARIES}>" | ||
"${EGL_LIBRARY}" | ||
JPEG::JPEG | ||
PRIVATE |
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.
by which logic is public/private decided here?
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.
I usually base it on whether the dependency is included from a public header. I will double check all of these before taking it out of draft.
The minimum CMake version was updated to 3.12 in #270. This cleans up the build using the feature to use target_link_libraries on object library targets that was added in CMake 3.12.
It has been tested on Linux with OpenGL. I will test it with more settings and on more systems as the work progresses.