Skip to content

Commit

Permalink
Fix build with Ubuntu 22.04LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
afichet committed Jun 14, 2023
1 parent b94c41b commit 3f52741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
with:
submodules: 'true'

- name: Install dependencies
run: sudo apt install libopenexr-dev

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand Down
10 changes: 7 additions & 3 deletions src/exr-png/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ find_package(OpenEXR CONFIG)
if (NOT OpenEXR_FOUND)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake/")
find_package(OpenEXR REQUIRED)
else ()
set(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath Threads::Threads)
endif ()
else()
if (TARGET OpenEXR::OpenEXR)
set(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath)
else()
set(OPENEXR_LIBRARIES OpenEXR::IlmImf)
endif()
endif()

add_executable(exr-png
main.cpp
Expand Down

0 comments on commit 3f52741

Please sign in to comment.