cmake: Add library dependencies in Config.cmake.in when building static libs#3552
Merged
lgritz merged 1 commit intoSep 14, 2022
Conversation
This fixes builds in projects that compile OpenImageIO as static libraries and don't themselves depend on the image libraries used by OpenImageIO such as PNG, JPEG or TIFF. When OpenImageIO is built as a static library its targets have e.g. PNG::PNG among INTERFACE_LINK_LIBRARIES. If the including project does not itself depend on PNG, the following error would be observed: Target "<...>" links to target "PNG::PNG" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
c310fe5 to
b7ced07
Compare
lgritz
approved these changes
Sep 14, 2022
Collaborator
lgritz
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix.
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 14, 2022
…ic (AcademySoftwareFoundation#3552) This fixes builds in projects that compile OpenImageIO as static libraries and don't themselves depend on the image libraries used by OpenImageIO such as PNG, JPEG or TIFF. When OpenImageIO is built as a static library its targets have e.g. PNG::PNG among INTERFACE_LINK_LIBRARIES. If the including project does not itself depend on PNG, the following error would be observed: Target "<...>" links to target "PNG::PNG" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 18, 2022
…ic (AcademySoftwareFoundation#3552) This fixes builds in projects that compile OpenImageIO as static libraries and don't themselves depend on the image libraries used by OpenImageIO such as PNG, JPEG or TIFF. When OpenImageIO is built as a static library its targets have e.g. PNG::PNG among INTERFACE_LINK_LIBRARIES. If the including project does not itself depend on PNG, the following error would be observed: Target "<...>" links to target "PNG::PNG" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
lgritz
added a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 23, 2022
Changes since RC1:
- ImageCache/TextureSystem both have added a `getattributetype()`
method, which retrieves just the type of a named attribute. AcademySoftwareFoundation#3559
(2.4.4.0) NOTE: THIS IS AN ABI BREAKING CHANGE
- Python: Fix the ability to `getattribute()` of int64 and uint64
metadata or attributes. AcademySoftwareFoundation#3555 (2.4.4.0)
- Build: Improvements to the generated cmake config files when
building static libraries. AcademySoftwareFoundation#3552 AcademySoftwareFoundation#3557 (2.4.4.0)
- Support for gcc 12.1. AcademySoftwareFoundation#3480 (2.4.2.1) AcademySoftwareFoundation#3551 (2.4.4.0)
- Support building with clang 15.0. AcademySoftwareFoundation#3563 (2.4.4.0)
- Fix cross-compiling on Android failing due to `-latomic` check. AcademySoftwareFoundation#3560
(2.4.4.0)
- Fix building on iOS. AcademySoftwareFoundation#3562 (2.4.4.0)
lgritz
added a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 23, 2022
Changes since RC1:
- ImageCache/TextureSystem both have added a `getattributetype()`
method, which retrieves just the type of a named attribute. AcademySoftwareFoundation#3559
(2.4.4.0) NOTE: THIS IS AN ABI BREAKING CHANGE
- Python: Fix the ability to `getattribute()` of int64 and uint64
metadata or attributes. AcademySoftwareFoundation#3555 (2.4.4.0)
- Build: Improvements to the generated cmake config files when
building static libraries. AcademySoftwareFoundation#3552 AcademySoftwareFoundation#3557 (2.4.4.0)
- Support for gcc 12.1. AcademySoftwareFoundation#3480 (2.4.2.1) AcademySoftwareFoundation#3551 (2.4.4.0)
- Support building with clang 15.0. AcademySoftwareFoundation#3563 (2.4.4.0)
- Fix cross-compiling on Android failing due to `-latomic` check. AcademySoftwareFoundation#3560
(2.4.4.0)
- Fix building on iOS. AcademySoftwareFoundation#3562 (2.4.4.0)
Note that we bumped the version to from 2.4.3.x 2.4.4.0 to reflect the
ABI break introduced by the last minute by the IC/TS addition of a new
virtual function. ABI will not change again for 2.4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes builds in projects that compile OpenImageIO as static libraries and don't themselves depend on the image libraries used by OpenImageIO such as PNG, JPEG or TIFF.
When OpenImageIO is built as a static library its targets have e.g. PNG::PNG among INTERFACE_LINK_LIBRARIES. If the including project does not itself depend on PNG, the following error would be observed:
Checklist:
have previously submitted a Contributor License Agreement
(individual, and if there is any way my
employers might think my programming belongs to them, then also
corporate).
(adding new test cases if necessary).