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

cmake: Additional controls to customize required/optional dependencies #2507

Merged
merged 1 commit into from
Mar 5, 2020

Commits on Mar 4, 2020

  1. cmake: Additional controls to customize required/optional dependencies

    New cmake variables `REQUIRED_DEPS` and `OPTIONAL_DEPS`.
    
    `REQUIRED_DEPS` is a list of individual package dependencies that are
    ordinarily optional (meaning, if not found, the build continues,
    possibly disabling some functionality or format support), and forcing
    them to be required (build failure if not found). Note that "ALL"
    means everying.
    
    `OPTIONAL_DEPS` is a list of individual package dependencies that
    makes them optional even if ordinarily (or via `REQUIRED_DEPS`) would
    be treated as optional. **Extreme caution necessary!** If you take
    something required and force it to be optional, there's no telling
    what else in the build might break as a result.
    
    A typical use case might be if you have automated builds and want to be
    sure that if for some reason they can't find all the dependencies (even the
    optional ones), you will definitely fail the build. But maybe you have some
    exceptions. For example,
    
        cmake ... -DREQUIRED_DEPS=ALL -DOPTIONAL_DEPS="DCMTK;R3DSDK"
    
    That means that you want any missing package dependencies to cause the build
    to fail, *except* for missing DCMTK and R3DSDK, which you don't care about.
    
    Also did some cleanup to turn PNG into an optional dependency, including
    graceful disabling of ICO if libpng is not found.
    lgritz committed Mar 4, 2020
    Configuration menu
    Copy the full SHA
    9d285dd View commit details
    Browse the repository at this point in the history