Skip to content

Commit

Permalink
CMake packaging fix. (#1674)
Browse files Browse the repository at this point in the history
* CMake packaging fix.

Add find_dependency for the new dependency libdeflate, and remove the REQUIRED flag. find_dependency will pickup the correct flag from the calling find_package call.

Signed-off-by: Peter Steneteg <peter@steneteg.se>

* find_dependency only if libdeflate_FOUND

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

* Need to expand the libdeflate_FOUND variable at configure_file time

Signed-off-by: Peter Steneteg <peter@steneteg.se>

---------

Signed-off-by: Peter Steneteg <peter@steneteg.se>
Signed-off-by: Cary Phillips <cary@ilm.com>
Co-authored-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
petersteneteg and cary-ilm committed Mar 25, 2024
1 parent 7239a26 commit edc86ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/OpenEXRConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ include(CMakeFindDependencyMacro)
set(openexr_needthreads @OPENEXR_ENABLE_THREADING@)
if (openexr_needthreads)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_dependency(Threads REQUIRED)
find_dependency(Threads)
endif()
unset(openexr_needthreads)

find_dependency(Imath REQUIRED)
find_dependency(Imath)

if (@libdeflate_FOUND@)
find_dependency(libdeflate)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

0 comments on commit edc86ed

Please sign in to comment.