-
Notifications
You must be signed in to change notification settings - Fork 102
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
Use cmake import targets part 2 #1746
base: master
Are you sure you want to change the base?
Use cmake import targets part 2 #1746
Conversation
4aa1de8
to
f092fc6
Compare
rts/lib/headlessStubs/CMakeLists.txt
Outdated
|
||
ADD_LIBRARY(headlessStubs STATIC EXCLUDE_FROM_ALL ${headlessStubsSources}) | ||
target_link_libraries(headlessStubs PUBLIC SDL2::SDL2) |
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.
headlessStubs should not be linking sdl2. I've also not noticed this in the previous PR only now, headless shouldn't be also linking GLEW. The same applies to dedicated.
So, 5e60482 started unnecessarily linking GLEW to headless and dedicated, this pr adds sdl2 to the mix.
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.
Yeah I noticed that too -- it actually still needs headers -- cmake 3.27 introduces a "include only" link -- maybe we could do that?
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.
Could you point me at the docs? Can't find it.
We can update build environment to cmake 3.27. Maximal version we can easy upgrade to is 3.28.4, because since 3.29 cmake requires python>=3.7 which the ancient ubuntu 18 doesn't have.
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 guy: COMPILE_ONLY
generator expression https://discourse.cmake.org/t/add-only-library-headers-during-target-link-libraries/2973/15
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.
f092fc6
to
5700171
Compare
I fixed the |
Depends on #1737
This adds imported targets for SDL and OpenAL