-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[draco] Can't link drakodec.lib with target_link_libraries, usage file missing #15527
Comments
Hi @MrROBUST Thanks for posting this issue. Seems there are some problems when using |
I think draco expoted |
Draco updated to 1.5.0 and reworked its |
@LesleyLai No it wasn't. |
I opened a PR to the upstream to fix this issue: google/draco#787 |
Thank you for doing this! |
Since draco 1.5.3 there is now a proper dracoConfig.cmake + dracoTargets.cmake which support imported targets. The usage information is also helpful now:
See #27145 |
Hello, after installing this library in vcpkg, it doesn't show how to use it.
I am trying to use the [draco] decoding support of the [tinygltf] library with this simple program example (main.cpp):
CMakeLists.txt
The project is built by Cmake using the vcpkg toolkit. Building with the Visual Studio 2019 compilers generates some linkage errors:
It looks like Draco header files can be found automatically with no additions to CMakeLists, but dracodec.lib or draco.lib is not passed to the linker.
If I add these lines to CMakeLists:
I got that error:
But something like this works (for a debug build):
I am wondering if I am doing something wrong or the port is missing some exports?
Additional context:
Draco's github page says we need to link the draco_dec (https://github.com/google/draco#c-decoder-api) but it's probably a typo (https://stackoverflow.com/questions/62313136/how-to-include-the-draco-dec-library). I have both draco.lib and dracodec.lib working so I'm not sure what should be linked by default. Should these be separate targets, like:
target_link_libraries(TinyGltfDraco PRIVATE draco::draco)
ortarget_link_libraries(TinyGltfDraco PRIVATE draco::dracodec)
?The text was updated successfully, but these errors were encountered: