Skip to content

Commit

Permalink
Propagate OPENEXR_INSTALL_PKG_CONFIG to internal Imath (AcademySoftwa…
Browse files Browse the repository at this point in the history
…reFoundation#1531)

* Propagate OPENEXR_INSTALL_PKG_CONFIG to internal Imath

If OpenEXR is installing a pkg-config file, then the internal Imath
build (if there is one) should install it, too.

Also, add an explicit release version variable to the .pc file.

This is in preparation for the python wheel build to pick up the
version settings from the pkg-config files.

Signed-off-by: Cary Phillips <cary@ilm.com>

* remove version= from OpenEXR.pc

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
cary-ilm committed Sep 23, 2023
1 parent 456bf42 commit 5240892
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ if(OPENEXR_INSTALL_PKG_CONFIG)
)
endfunction()
openexr_pkg_config_help(OpenEXR.pc.in)
message(STATUS "OpenEXR pkg-config generation enabled")
else()
message(STATUS "-- pkg-config generation disabled")
message(STATUS "OpenEXR pkg-config generation disabled")
endif()

###################################################
Expand Down
5 changes: 5 additions & 0 deletions cmake/OpenEXRSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ if(NOT TARGET Imath::Imath AND NOT Imath_FOUND)
FetchContent_GetProperties(Imath)
if(NOT Imath_POPULATED)
FetchContent_Populate(Imath)

# Propagate OpenEXR's setting for pkg-config generation to Imath:
# If OpenEXR is generating it, the internal Imath should, too.
set(IMATH_INSTALL_PKG_CONFIG ${OPENEXR_INSTALL_PKG_CONFIG})

# hrm, cmake makes Imath lowercase for the properties (to imath)
add_subdirectory(${imath_SOURCE_DIR} ${imath_BINARY_DIR})
endif()
Expand Down

0 comments on commit 5240892

Please sign in to comment.