Skip to content

Instantly share code, notes, and snippets.

@bluca
Created October 28, 2021 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluca/6b41f913828db63bbbd7b14cb9f1d72a to your computer and use it in GitHub Desktop.
Save bluca/6b41f913828db63bbbd7b14cb9f1d72a to your computer and use it in GitHub Desktop.
circular pkgconfig deps
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include
Name: libone
Version: 1.0
Description: foo
Libs: -L${libdir} -lone
Cflags: -Done
Requires: libtwo
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include
Name: libtwo
Version: 1.0
Description: foo
Libs: -L${libdir} -ltwo
Cflags: -Dtwo
Requires: libone
$ PKG_CONFIG_PATH=/tmp/ pkg-config --libs libone
-lone -ltwo
$ PKG_CONFIG_PATH=/tmp/ pkg-config --libs libtwo
-ltwo -lone
$ PKG_CONFIG_PATH=/tmp/ pkg-config --libs --cflags libtwo
-Dtwo -Done -ltwo -lone
$ PKG_CONFIG_PATH=/tmp/ pkg-config --libs --cflags libone
-Done -Dtwo -lone -ltwo
$ PKG_CONFIG_PATH=/tmp/ pkg-config --libs --cflags libone libtwo
-Dtwo -Done -ltwo -lone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment