Skip to content

Commit

Permalink
gdk-pixbuf: Explicitly pass link directories
Browse files Browse the repository at this point in the history
FreeBSD by default only looks for headers/libraries in base system, so
depending on packages requires passing -isystem + -L or relying on pkg-config.

FAILED: contrib/gdk-pixbuf/libpixbufloader-avif.so
: && /usr/bin/cc -fPIC    -shared  -o contrib/gdk-pixbuf/libpixbufloader-avif.so contrib/gdk-pixbuf/CMakeFiles/pixbufloader-avif.dir/loader.c.o  -Wl,-rpath,/tmp/libavif_build:  -lgdk_pixbuf-2.0  -lgobject-2.0  -lglib-2.0  -lintl  libavif.so.16.0.0 && :
ld: error: unable to find library -lgdk_pixbuf-2.0
ld: error: unable to find library -lgobject-2.0
ld: error: unable to find library -lglib-2.0
ld: error: unable to find library -lintl
cc: error: linker command failed with exit code 1 (use -v to see invocation)
  • Loading branch information
jbeich authored and wantehchang committed Aug 29, 2023
1 parent 378ec52 commit e96d042
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/gdk-pixbuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if(AVIF_BUILD_GDK_PIXBUF)
add_library(pixbufloader-avif MODULE ${GDK_PIXBUF_SRCS})

target_link_libraries(pixbufloader-avif PUBLIC ${GDK_PIXBUF_LIBRARIES} avif)
target_link_directories(pixbufloader-avif PUBLIC ${GDK_PIXBUF_LIBRARY_DIRS})
target_include_directories(pixbufloader-avif PUBLIC ${GDK_PIXBUF_INCLUDE_DIRS})

pkg_get_variable(GDK_PIXBUF_MODULEDIR gdk-pixbuf-2.0 gdk_pixbuf_moduledir)
Expand Down

0 comments on commit e96d042

Please sign in to comment.