Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Specify dependencies on object library targets #282

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JosiahWI
Copy link
Contributor

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.

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.
Comment on lines +547 to +549
<$BUILD_INTERFACE:IRROBJ>
<$BUILD_INTERFACE:IRROTHEROBJ>
<$BUILD_INTERFACE:IRRVIDEOOBJ>
Copy link
Contributor Author

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.

@numberZero
Copy link
Contributor

Can’t you just replace target_sources with linking to the object libraries?

@JosiahWI
Copy link
Contributor Author

JosiahWI commented Jan 20, 2024

Can’t you just replace target_sources with linking to the object libraries?

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}")
Copy link
Member

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

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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.

@sfan5 sfan5 added the WIP Work-in-Progress label Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
WIP Work-in-Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants