You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, since this is a .pc file which uses the ${VAR} syntax for its own substitution purposes, we really only want @VAR@ to be substituted. The problem is that ${libdir} and ${includedir} in the opus.pc.in file (shown below) are substituted when they shouldn't be. This results in absolute paths being embedded in -L and -l flags, breaking pkg-config's own substitution/relocation/prefix mechanism.
I fixed this locally by adding the @ONLY attribute: configure_file(opus.pc.in opus.pc @ONLY). The resulting opus.pc file is relocatable and works smoothly with the usual pkg-config --define-prefix mechanism.
The text was updated successfully, but these errors were encountered:
There is a problem with variable substitution when generating the
opus.pc
pkg-config file using CMake.CMakeLists.txt executes
configure_file(opus.pc.in opus.pc)
, which according to the CMake docs will substitute occurrences of@VAR@
AND${VAR}
inopus.pc.in
. See: https://cmake.org/cmake/help/v3.10/command/configure_file.htmlHowever, since this is a .pc file which uses the
${VAR}
syntax for its own substitution purposes, we really only want@VAR@
to be substituted. The problem is that${libdir}
and${includedir}
in theopus.pc.in
file (shown below) are substituted when they shouldn't be. This results in absolute paths being embedded in-L
and-l
flags, breaking pkg-config's own substitution/relocation/prefix mechanism.I fixed this locally by adding the
@ONLY
attribute:configure_file(opus.pc.in opus.pc @ONLY)
. The resultingopus.pc
file is relocatable and works smoothly with the usualpkg-config --define-prefix
mechanism.The text was updated successfully, but these errors were encountered: