Skip to content

Commit

Permalink
build: fix missing target_link_options for libraries
Browse files Browse the repository at this point in the history
It seems that two targets `libOpenImageIO`, `libOpenImageIO_Util` were left out
during the [switch to target-based definitions]
(#4193)
refactor and have no `-ftest-coverage -fprofile-arcs` options added in
the CODECOV=1 mode.

This was due to #4193 failing to propagate the link options to the dynamic libraries.

Adding the missing options resolves build errors.

Signed-off-by: kuba <[email protected]>
  • Loading branch information
kaarrot authored Apr 12, 2024
1 parent ab87887 commit 0dd63f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libOpenImageIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ target_compile_definitions(OpenImageIO PRIVATE
${${PROJECT_NAME}_compile_definitions})
target_compile_options(OpenImageIO PRIVATE
${${PROJECT_NAME}_compile_options})
target_link_options(OpenImageIO PRIVATE
${${PROJECT_NAME}_link_options})

# If the 'EMBEDPLUGINS' option is set, we want to compile the source for
# all the plugins into libOpenImageIO.
Expand Down
3 changes: 3 additions & 0 deletions src/libutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function (setup_oiio_util_library targetname)
${${PROJECT_NAME}_compile_definitions})
target_compile_options(${targetname} PRIVATE
${${PROJECT_NAME}_compile_options})
target_link_options(${targetname} PRIVATE
${${PROJECT_NAME}_link_options})

target_include_directories (${targetname}
PUBLIC
$<INSTALL_INTERFACE:include>
Expand Down

0 comments on commit 0dd63f6

Please sign in to comment.