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
Fix CMake warning on macOS since CMake 3.9 #1371
Conversation
500e2ec
to
9996dbf
Compare
I gave this a quick test and it fixes the warning as expected (cmake 3.10.2). I couldn't test the actual install part as I am not quiet sure how. |
To install you just need to build the “install” target. Just make sure to select a writable install prefix in CMake config. About testing, I don’t think installing will help much. You can but you mainly need to check that the frameworks/dylibs can be embedded in bundle apps exactly the same way as previously, or check the paths shown by “otool -L” on all generated binaries. Probably the easiest and most reliable. |
@mantognini Are you able to check the PR so that it can be merged? Dunno if you're still away from home though. |
I've tested this and it does indeed make the warning go away. Doesn't seem to have any adverse affect on my game bundling either |
@mantognini I’d really prefer the big one to be merged first : it’ll fix CI, and some of my changes for iOS depend on it, and it’s much easier to merge and fix conflict in a small PR :) |
Merged in 8b7a50a |
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) | ||
else() | ||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE) |
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.
Did we mean to use SFML
here instead of ${target}
? I can't find a variable defined with the name target
in CMakeLists.txt. I just found this out because I started enforcing uninitialized variable warnings.
https://github.com/SFML/SFML/actions/runs/6859641809/job/18652242185#step:14:43
This fixes this warning since CMake 3.9 where CMP0068 was introduced:
Happens at CMake generation time.
Originally reported by @mantognini in #1344
I checked the output of the installed dylibs and frameworks with "otool -L", after having generated both with CMake 3.10 and 3.0, and they looked exactly the same as what's shipped for current latest SFML release.