Skip to content

Commit 0dd63f6

Browse files
authored
build: fix missing target_link_options for libraries
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 <kuba456@gmail.com>
1 parent ab87887 commit 0dd63f6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/libOpenImageIO/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ target_compile_definitions(OpenImageIO PRIVATE
8282
${${PROJECT_NAME}_compile_definitions})
8383
target_compile_options(OpenImageIO PRIVATE
8484
${${PROJECT_NAME}_compile_options})
85+
target_link_options(OpenImageIO PRIVATE
86+
${${PROJECT_NAME}_link_options})
8587

8688
# If the 'EMBEDPLUGINS' option is set, we want to compile the source for
8789
# all the plugins into libOpenImageIO.

src/libutil/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ function (setup_oiio_util_library targetname)
4242
${${PROJECT_NAME}_compile_definitions})
4343
target_compile_options(${targetname} PRIVATE
4444
${${PROJECT_NAME}_compile_options})
45+
target_link_options(${targetname} PRIVATE
46+
${${PROJECT_NAME}_link_options})
47+
4548
target_include_directories (${targetname}
4649
PUBLIC
4750
$<INSTALL_INTERFACE:include>

0 commit comments

Comments
 (0)