-
Notifications
You must be signed in to change notification settings - Fork 3
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
Parse linking dependencies and bundle dependencies from CMake output instead of hardcoding #29
Comments
These informations are only output after the build, but we need to use them before the build, which is a contradiction. |
That's fine since libcef_dll_wrapper will be built before rust compilation. |
Lines 72 to 97 in 74e4f14
Oh, I mean that when building the |
But libcef_dll_wrapper doesn't need those libs while compiling, don't know why they are listed here, I linked them with rust previously https://github.com/tauri-apps/cef-rs/pull/15/files#diff-2620be2afc249413fa14ee1f678c9c7ab8f0658f44f5c6d49cff57956c716debR27 cc @wravery |
It's because of the way that cargo propagates the link flags from the sys crate to its dependencies. Using the This way, it's taking the import libs (or the implementation lib in the case of |
Actually, that's not quite correct, cargo is associating the link flags with the static library, not statically linking them into it as built by CMake. It's more like adding the link flags/dependencies to a CMake target and getting them added to any downstream consumers of that target along with the output of that target. |
After some investigation, the most stable way to get those dependencies I could find is "grep" on the output of cmake cli output.
cmake can print its trace in json format(
--trace-format=json-v1 --trace-expand
), but the output still hard to use:while the cli output is easy to "grep":
The text was updated successfully, but these errors were encountered: