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

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Mar 5, 2020

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.

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 lgritz merged commit 9ce868a into AcademySoftwareFoundation:master Mar 5, 2020
@lgritz lgritz deleted the lg-deps branch March 5, 2020 22:34
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Mar 14, 2020
AcademySoftwareFoundation#2507)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant