Skip to content
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

Unify static linking for all operating systems and improve README #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 29, 2024

  1. Unify static linking for all operating systems and improve README

    This commit unifies the code for static linking under all operating
    systems, with a focus on fixing problems for Windows:
    
    1.  All functionality for pkg-config is now enabled for Windows as well.
        For example, a vcpkg-built pkgconf works great.  Therefore, it seems
        there is no reason to prevent users from using pkg-config on Windows
        if they want to use it.
    
    2.  When not using pkg-config on Windows, and statically linking against
        FFmpeg libraries, many system libraries will also need to be linked.
        A list of known system libraries will now be linked in such
        situations.  It's best to use pkg-config, but this will at least
        reduce the probability of linker errors.  Note that we also have to
        do this for vcpkg as well.
    
    3.  Code duplication between Windows and other operating systems has
        been eliminated.
    
    4.  The statik flag is now correctly passed to pkg_config when in the
        static_linking function.
    
    5.  The GitHub Actions workflow is updated to test the new possibilities
        on Windows.  The example program is also run, which revealed that
        the existing vcpkg-based way of finding FFmpeg was missing several
        system libraries for linking.
    
    6.  Make significant improvements to the README.  More detailed
        information about environment variables, features, how the build
        script works, vcpkg triples, and more is included to help users
        work with the crate.
    
    Improving the functionality of dynamic linking is an obvious next step,
    but is out of scope of this commit.  It's likely that a single, large
    function can eventually be used for both static and dynamic linking.
    JohnstonJ committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    fd84ee9 View commit details
    Browse the repository at this point in the history