videolabs / libspatialaudio

Ambisonic encoding / decoding and binauralization library in C++
Other
198 stars 37 forks source link

Fix MySofa library directory detection #41

Closed eclipseo closed 5 months ago

eclipseo commented 5 months ago

Current code was causing issues because:

get_filename_component(MYSOFA_LIB_DIR "${MYSOFA_LIBRARIES}" DIRECTORY)

was nil.

Thus we had:

Libs: -L${libdir} -lspatialaudio -L -lmysofa -lm -lz

in spatialaudio.pc

And thus, while building vlc, libtool was unhappy:

libtool: error: require no space between '-L' and '-lmysofa'

Here we use proper pkg-config feature PKG_CONFIG_LIBRARY_DIRS to get the directory set in libmysofa.pc, with a find_path fallback.