When trying to crosscompile a pvr addon with yajl as dependency I get the following error:
CMake Error at /home/ijr/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Yajl (missing: YAJL_LIBRARY) (found suitable version
"2.1.0", minimum required is "2.0.0")
Call Stack (most recent call first):
/home/ijr/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
FindYajl.cmake:46 (find_package_handle_standard_args)
CMakeLists.txt:13 (find_package)
-- Configuring incomplete, errors occurred!
Display More
After some investigation I found that the compiler was looking for the static library based on this line in the cmake file:
find_library(YAJL_LIBRARY NAMES yajl_sPATHS ${PC_YAJL_LIBDIR})
so after doing the following it works:
cp build.LibreELEC-RPi2.arm-9.0-devel/yajl-2.1.0/.armv7ve-libreelec-linux-gnueabi/yajl-2.1.0/lib/libyajl_s.a build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/lib/
However I would like solve the problem in a more elegant way, and not have to repeat the above each time I build the addon.
How to achieve this?
Any help is greatly appreciated.