leadedge / Spout2

A video frame sharing system for Microsoft Windows
BSD 2-Clause "Simplified" License
760 stars 138 forks source link

Use TARGET_LINKER_FILE/TARGET_LINKER_FILE_NAME with SpoutLibrary #97

Closed scribam closed 1 year ago

scribam commented 1 year ago

https://cmake.org/cmake/help/v3.27/manual/cmake-generator-expressions.7.html#genex:TARGET_LINKER_FILE

$ File used when linking to the tgt target. This will usually be the library that tgt represents (.a, .lib, .so), but for a shared library on DLL platforms, it would be the .lib import library associated with the DLL.

Fix MINGW which generates a file named libSpoutLibrary.dll.a and not SpoutLibrary.lib

leadedge commented 1 year ago

I understand the change but I am not sure what effect this might have on PR #64 for single config generators support by @jockekilby. Could you explain a little more about that.

jockekilby commented 1 year ago

I haven't had a chance to test it but I don't believe this change would have any impact on the functionality I introduced in this commit, but the changes should be made for theSpotGL project as well?

leadedge commented 1 year ago

Thanks very much @jockekilby . I think this is should be a useful addition by @scribam. What I think I will do is make the changes by hand with the original commented out just in case. I will look at SpoutGL as well. I will be busy for a few days but will do so as soon as I can.

jockekilby commented 1 year ago

ok, let me know if you require assistance 😄

leadedge commented 1 year ago

I made the proposed changes and left the old code as comments for reference. I am not sure that the SpoutGL project file needs to be changed since there are independent name definitions already.