From patchwork Wed May 4 15:50:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: cmake.bbclass: set the rpath for binaries build with cmake to ${libdir} Date: Wed, 04 May 2011 15:50:28 -0000 From: Simon Busch X-Patchwork-Id: 3193 Message-Id: <1304524228-25642-1-git-send-email-morphis@gravedo.de> To: openembedded-devel@lists.openembedded.org In the default configuration cmake does not set a rpath for its builded binaries. This leads to errors at runtime when the binaries not find their needed runtime libraries. Signed-off-by: Simon Busch Acked-by: Phil Blundell --- classes/cmake.bbclass | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index 40fadea..5f7066b 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -44,6 +44,10 @@ cmake_do_generate_toolchain_file() { echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )" >> ${WORKDIR}/toolchain.cmake # Use qt.conf settings echo "set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf )" >> ${WORKDIR}/toolchain.cmake + +# We need to set the rpath to the correct directory as cmake does not provide any +# directory as rpath by default + echo "set( CMAKE_INSTALL_RPATH ${libdir} )" >> ${WORKDIR}/toolchain.cmake } addtask generate_toolchain_file after do_patch before do_configure