ports/graphics/libavif/files/patch-CMakeLists.txt

17 lines
732 B
Text

https://github.com/AOMediaCodec/libavif/issues/2264
--- CMakeLists.txt.orig 2024-07-11 14:39:50 UTC
+++ CMakeLists.txt
@@ -168,10 +168,8 @@ function(avif_target_link_library target)
if(NOT install_target)
set(install_target ${target})
endif()
- # The transitive dependency is an export link library if it is a shared
- # library, or if it is a static library in a static build
- get_target_property(target_type ${target} TYPE)
- if(target_type STREQUAL "SHARED_LIBRARY" OR NOT BUILD_SHARED_LIBS)
+ # The transitive dependency is needed in a static build.
+ if(NOT BUILD_SHARED_LIBS)
target_link_libraries(avif PUBLIC $<INSTALL_INTERFACE:${install_target}>)
endif()
endfunction()