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 USE_STATIC_CRT option #4444
Conversation
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.
Looks good, I will merge it!
Merged, thanks a lot for your contribution. |
This PR prevents building Assimp in release with /MDd or /MTd, breaking the xmake-repo package.
(sorry for the french logs). I have to use MDd runtime because my own project uses debug (and MD libraries aren't compatibles with MDd), but don't want to compile Assimp in debug because I don't need to (and will lose a lot of performances due to optimizations being disabled). I don't think this is the way thoses flags should be used. CMake already provides MSVC_RUNTIME_LIBRARY. If we want to keep this, we should at least provide a way to disable it to rely on standard cmake option.
Actually it does, since it forces MD in release (and MDd in debug) if left off |
There is no reason to add this kind of option, https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html is your friend. |
Allow user to choose C runtime library version, on Windows
This PR adds an option to cmake,
USE_STATIC_CRT
.The default is OFF, which has no changes to the current build.