Dependencies between recipes


daniel_herrmann22@...
 

Hello, 

I'm stucking a little bit by compiling a cmake application which has dependencies
on libs from another recipe.

1)
The recipe which provided my libs is a normal debian package which I installed in yocto like this:

SRC_URI = "file://${BP}.deb"
S = "${WORKDIR}"

inherit bin_package pkgconfig

do_install() {
    install -d ${D}/opt/package-name/include/ 
    install -d ${D}/opt/package-name/lib
    install -d ${D}/opt/package-name/lib/cmake   
}

FILES_${PN} = "/opt/package-name/lib/folder"
FILES_${PN} += "/opt/package-name/include/folder"


2)
The libs from 1) I want to use in the cmake-application

2.1)
CmakeLists.txt is like this:

cmake_minimum_required(VERSION 2.8)
project(test)
set(package_DIR /opt/package-name/lib/cmake)   #path to cmake package -> Config.cmake
find_package(package)
add_executable(test main.cpp)
target_link_libraries(test package::lib)

-> I dont know how to set the right path to the Config.cmake. At the moment it points to the host location.
I have tried like this ${STAGING_DIR}/opt/... which should point to the sysroot, but no success.


2.2)
Recipe for the cmake-application in short

DEPENDS += "package-name"   # package from 1)
inherit cmake
SRC_URI="git://....
SRCREV = "...."

S = "${WORKDIR}/git"

do_install(){
    install -d ${D}/${bindir}
    install -m0755 test ${D}/${bindir}   
}

FILES_${PN} = "/usr/bin/test"

RDEPENDS_${PN} += "package-name"


When I make a sysroot from the hole image with bitbake -c populate_sdk  and I point directly to path where the Config.cmake is stored, everythings works..
Is there any way to make it work in the yocto build process, without making a explicit sysroot ?

Thanks

Join yocto@lists.yoctoproject.org to automatically receive all group messages.