Open agnickolov opened 1 month ago
The CMakeLists is correct. USE_SYSTEM_JUICE
means linking against the system (dynamic) library, irrelevant of libdatachannel being static or not. Otherwise, it links against the submodule statically. This is how it works with every other submodule.
I'm using vcpkg to install libdatachannel and directing it to generate static libraries. It already has a patch to achieve that even if the library doesn't support that off the shelf. That's not my problem. The problem is that the datachannel-static.lib file as generated depends on the dynamic version of libjuice. I traced the problem to this problematic construct within CMakeLists.txt (lines 418-430):
The dependencies wires seem to get crossed improperly. I believe the correct linkage should be as follows instead:
The above issue results in unresolved external symbols for every function from libjuice used in libdatachannel.