cmake with libxml2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cmake with libxml2

1,104 Views
kat61545
Contributor II

Hello,

I'm writing the application for xml parser (libxml2). I'm using cmake for my project

kat61545_0-1599128947626.png

CMakeList.txt

cmake_minimum_required(VERSION 2.8)

project (GW)

find_package(LibXml2 REQUIRED)

message(STATUS LIBXML2_FOUND = ${LIBXML2_FOUND})

include_directories(include ${LIBXML2_INCLUDE_DIR})

file(GLOB SOURCES */*.c *.c */*.h)

add_executable(gateway ${SOURCES})

target_link_libraries(gateway ${LIBXML2_LIBRARIES})

cmake is success on the ubuntu 16, but when i used cmake with sdk (bitbake fsl-image-qt5 -c populate_sdk), i got the error: Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES) (found version "2.9.4")

local.conf

DISTRO ?= 'fsl-imx-x11'
PACKAGE_CLASSES ?= "package_rpm"
CORE_IMAGE_INSTALL_append = "ppp wvdial usb-modeswitch gstreamer1.0-libav python-pip curl libxml2 libxml2-native python-requests "
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
PACKAGECONFIG_append_pn-qtmultimedia = "gstreamer"
CONF_VERSION = "1"
LICENSE_FLAGS_WHITELIST="commercial"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

 

How to add libxml2-dev to sdk? thank you

0 Kudos
1 Reply

1,094 Views
kat61545
Contributor II

solved!!!

0 Kudos