Googletest in imx-image-full and SDK
Hi,
I built the imx-image-full and SDK images for imx8qmmek board. I need the gtest shared libs libgtest.so & libgtest_main.so, and they are not available on the target, but the static libs libgtest.a, libgtest_main.a are present in the SDK cortexa72-cortexa53-crypto-poky-linux sysroot.
I guess I can add IMAGE_INSTALL_append = " googletest" in local.conf to have gtest built in the image. However, I noticed there are 2 googletest recipe files in 2 separated layers:
meta-imx/meta-bsp/recipes-test/googletest/googletest_git.bb
meta-openembedded/meta-oe/recipes-test/googletest/googletest_git.bb
My questions are:
why the SDK (through polulate_sdk) sysroot has gtest static libs in the first place?
which recipe file I should change to build share libs instead of static libs in both target image and SDK image, and how to change?
Thanks,
Lijun
Hi
Try to change gmock_main.pc.in:
Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ -DBUILD_SHARED_LIBS=ON
Thanks for the quick reply. To change the file gmock_main.pc.in, how do I patch it in the yocto recipe file? By the way, the two yocto recipes for google test, which one is being used?
meta-imx/meta-bsp/recipes-test/googletest/googletest_git.bb
meta-openembedded/meta-oe/recipes-test/googletest/googletest_git.bb
Thanks,