Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge static libraries in avif_apps #2153

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

vrabaud
Copy link
Collaborator

@vrabaud vrabaud commented May 7, 2024

This fixes #1679
[100%] Linking CXX executable avifenc
/usr/bin/cmake -E cmake_link_script CMakeFiles/avifenc.dir/link.txt --verbose=1
/usr/bin/clang++ -O3 -DNDEBUG CMakeFiles/avifenc.dir/apps/avifenc.c.o "_deps/svt-build/third_party/cpuinfo/CMakeFiles/cpuinfo.dir/src/init.c.o" "_deps/svt-build/third_party/cpuinfo/CMakeFiles/cpuinfo.dir/src/api.c.o" "_deps/svt-build/third_party/cpuinfo/CMakeFiles/cpuinfo.dir/src/x86/x86_init.c.o" "_deps/svt-build/third_party/cpuinfo/CMakeFiles/cpuinfo.dir/src/x86/vendor.c.o" "_deps/svt-build/third_party/cpuinfo/CMakeFiles/cpuinfo.dir/src/x86/isa.c.o" "_deps/svt-build/third_party/cpuinfo/CMakeFiles/cpuinfo.dir/src/x86/linux/init.c.o" "_deps/svt-build/third_party/cpuinfo/deps/clog/CMakeFiles/clog.dir/src/clog.c.o" -o avifenc -L/usr/local/google/home/vrabaud/software/avif/build/_deps/dav1d-install/lib -Wl,-rpath,/usr/local/google/home/vrabaud/software/avif/build/_deps/dav1d-install/lib: libavif_apps.a /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libjpeg.so

get_target_property(is_avif_local ${lib} AVIF_LOCAL)
if(is_avif_local)
list(APPEND libs $<TARGET_FILE:${lib}>)
list(APPEND dependencies "${lib}")
else()
if(${child_target_type} STREQUAL "UNKNOWN_LIBRARY")
# This is a global library. It needs to be linked to.
get_target_property(include_dirs ${lib} INTERFACE_INCLUDE_DIRECTORIES)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I suggest not separaring the comment from the code (line 81: target_link_libraries(${target} ${lib})) that it describes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When linking avifenc with the merged static lib libavif.a, we still link with libaom.a, libdav1d.a, etc.
2 participants