-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Can't link against custom static boost build #407
Comments
Filed as internal issue #156962. |
@ix-dcourtois thanks for posting this! One concern I have about this change is that linking boost::python statically leads to all sorts of problems with the Python bindings. That's one of the reasons we forced the use of the dynamic libraries originally. I get the desire to be able to use the static boost libs, though. I wonder if there's some way we can partition things so that we allow the static versions of the boost libs except boost::python? |
@sunyab Hi, thanks for taking the time to check this PR. There seems to be a way to do that, but it could be a bit tricky. In the FindBoost.cmake module, there an example which goes like this:
So maybe this kind of thing could be used to first get the static version of boost::python, and then invoked again with The problem I see with this, is that:
To put this pull request in context, here's our use case: we are already using and linking boost internally (as well as openimageio and various other libs used by USD), but we're using static versions of the libs. So in order to use USD in our software, we need to build against our prebuilt versions. Since we don't need the python bindings for now, we don't have the problem you mentioned. This PR fixes only this case. I'll try to check what the problem is with the Python bindings, but I'm not sure it can be fixed easily :p |
add support for Boost_USE_STATIC_LIBS on Windows. Fixes #407
Fixes syntax issue in earlier change 1863058 that caused BOOST_ALL_DYN_LINK to not be defined in the typical case where a user didn't specify Boost_USE_STATIC_LIBS when running CMake. Fixes #407 (Internal change: 1863247)
We discussed this a bit and we think it's good to give users the ability to opt in to this behavior at their own risk rather than completely disallow it. I've merged in your pull request, but also note the follow-up commit f9c5d50. Thanks! |
…AnimationStudios#407) ### Description of Change(s) Premultied the color for basisCurves with style, as the styled line should be rendered in translucent pass, and the translucent pass uses (ONE, ONE-srcAlpha) blend factor. Simply premultiply color will make the rendering of patterned lines better, but sketched line worse. This is because the patterned lines uses a material whose metadata is translucent. But sketched lines doesn't have material, so it is still rendered in opaque pass, which is incorrect. So in this pr, I moved most of the fragment shader of styled line from the basisCurves.glslfx to plugin folder. The fragment shader is divided into sketch surface shader and pattern surface shader. Both are with translucent metadata. Now the sketch lines should also use material, and the material must use the sketch surface shader. ### Fixes Issue(s)
Description of Issue
When building USD against pre-built libraries using CMake,
Boost_USE_STATIC_LIBS
option is ignored, resulting in linking errors if the prebuilt boost libs were built as static libs.The fix is fairly simple, and I have a fix (and pull request) ready to allow users to use the
Boost_USE_STATIC_LIBS
. I'm posting this issue as per the "Contributing to USD" guide :)Steps to Reproduce
-DBOOST_ROOT=<path_to_boost> -DBoost_USE_STATIC_LIBS=On
LINK : fatal error LNK1104: cannot open file 'boost_regex-vc140-mt-1_61.lib'
System Information (OS, Hardware)
Windows 10 (but probably on any platform)
Package Versions
0.8.x and dev branch
Build Flags
The text was updated successfully, but these errors were encountered: