Open gregbenz opened 2 days ago
Option -DBUILD_SHARED_LIBS=0
during cmake configuration should create a static binary.
Thank you, didn't realize that was already established for Win too.
For distributing binaries, it is best if they are purely static. That is they should not depend on runtime dlls/so's. The option -DBUILD_SHARED_LIBS=0
ensures the third party dependencies that are used during linking are static ones. However the app that is generated is not purely static. It still could be using system libraries that are shared in nature. To address this, target_link_options(ultrahdr_app PRIVATE -static)
or something of this sort (basing on the platform) is needed. As make install is not distributing any binaries, this is not done.
Is there a compile command which wouuld accomplish that purely static result with the current CMakeLists.txt? If not, could it be updated so that a command could be used without needing to edit CMakeLists.txt (as that would become outdated anytime the source is downloaded).
Is there a compile command which wouuld accomplish that purely static result with the current CMakeLists.txt? If not, could it be updated so that a command could be used without needing to edit CMakeLists.txt (as that would become outdated anytime the source is downloaded).
currently no.
re-opening as a request, I believe this would be ideal to fix in the original source
It would be helpful if CMakeLists.txt were updated to support static builds on Windows so that any external dependencies could be easily built into ultrahdr_app.exe when compiling