Skip to content

Commit

Permalink
Adjust scopes of avifincrtest_helpers dependencies
Browse files Browse the repository at this point in the history
"gtest/gtest.h" is included by avifincrtest_helpers.cc but not by the
header avifincrtest_helpers.h, so move GTest::GTest to the PRIVATE
scope. Also move avif_enable_warnings to the PRIVATE scope.

Part 3 of the fix for
#2340.
  • Loading branch information
wantehchang committed Jul 31, 2024
1 parent a0041de commit 1f86eb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ endmacro()
if(AVIF_ENABLE_GTEST)
check_avif_option(AVIF_GTEST TARGET GTest::GTest PKG_NAME GTest)
add_library(avifincrtest_helpers OBJECT gtest/avifincrtest_helpers.cc)
target_link_libraries(avifincrtest_helpers avif GTest::GTest avif_enable_warnings)
target_link_libraries(avifincrtest_helpers PUBLIC avif)
target_link_libraries(avifincrtest_helpers PRIVATE GTest::GTest avif_enable_warnings)
add_library(avifincrtest_helpers_internal OBJECT gtest/avifincrtest_helpers.cc)
target_link_libraries(avifincrtest_helpers_internal avif_internal GTest::GTest avif_enable_warnings)
target_link_libraries(avifincrtest_helpers_internal PUBLIC avif_internal)
target_link_libraries(avifincrtest_helpers_internal PRIVATE GTest::GTest avif_enable_warnings)
endif()

if(AVIF_ENABLE_GTEST)
Expand Down

0 comments on commit 1f86eb6

Please sign in to comment.