Link Android's `log` with PRIVATE visibility (#2815)

INTERFACE should be used on dependencies from other than our source files.
PRIVATE should be used the include happens in our source files.

In this case (src/catch2/internal/catch_debug_console.cpp:20) the include
is from our source file.

I encountered a issue with this when building Catch2 for Android in
combination with BUILD_SHARED_LIBS. Changing the visibility to PRIVATE
fixes the issue.
This commit is contained in:
itacud95 2024-02-20 00:32:12 +01:00 committed by GitHub
parent 28c2f0b0c2
commit 024cfb3542
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ endif()
add_library(Catch2::Catch2 ALIAS Catch2)
if (ANDROID)
target_link_libraries(Catch2 INTERFACE log)
target_link_libraries(Catch2 PRIVATE log)
endif()
set_target_properties(Catch2 PROPERTIES