Skip to content

Commit

Permalink
build: Add a way to cram in a custom extra library for iv (#4086)
Browse files Browse the repository at this point in the history
It's a little involved to explain why, but at work a combination of
libraries and some trickery with static linkage led me to really need a
way to inject another library into the mix, just for iv linkage.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz authored Dec 27, 2023
1 parent 406704d commit 6ed14ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/iv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# SPDX-License-Identifier: Apache-2.0
# https://github.com/AcademySoftwareFoundation/OpenImageIO

set (OIIO_IV_EXTRA_IV_LIBRARIES "" CACHE STRING "Paths to extra libraries to force iv to link against")

set (CMAKE_AUTOMOC ON)
if (Qt5_POSITION_INDEPENDENT_CODE OR Qt6_POSITION_INDEPENDENT_CODE)
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand All @@ -25,6 +27,7 @@ if (iv_enabled AND (Qt5_FOUND OR Qt6_FOUND) AND OPENGL_FOUND)
${OPENGL_LIBRARIES}
$<TARGET_NAME_IF_EXISTS:OpenColorIO::OpenColorIO>
$<TARGET_NAME_IF_EXISTS:OpenColorIO::OpenColorIOHeaders>
${OIIO_IV_EXTRA_IV_LIBRARIES}
)
if (iv_enabled AND FORCE_OPENGL_1)
target_compile_definitions(iv PRIVATE FORCE_OPENGL_1)
Expand Down

0 comments on commit 6ed14ff

Please sign in to comment.