summaryrefslogtreecommitdiff
path: root/graphics/asymptote/thirdparty_impl/tinyexr_impl/CMakeLists.txt
blob: cc47d3822571c3e6e28f9e65ee6e2b5de59f6084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Implementation library for tinyexr

cmake_minimum_required(VERSION 3.27)
project(tinyexr-impl)

# fetch content

set(TINYEXR_REPO_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../../tinyexr" CACHE PATH "Tinyexr repo location")
add_library(tinyexr-impl src/tinyexr_impl.cc)
target_include_directories(
        tinyexr-impl PUBLIC ${TINYEXR_REPO_LOCATION}
)

# zlib
find_package(ZLIB REQUIRED)
if (ZLIB_FOUND)
    target_compile_definitions(tinyexr-impl PRIVATE HAVE_ZLIB)
else()
    message(WARNING "zlib not found; will use miniz")
endif()

target_link_libraries(tinyexr-impl PRIVATE ZLIB::ZLIB)