All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmake.bbclass: set the rpath for binaries build with cmake to ${libdir}
@ 2011-05-04 15:50 Simon Busch
  2011-05-04 16:09 ` Phil Blundell
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Busch @ 2011-05-04 15:50 UTC (permalink / raw)
  To: openembedded-devel

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 <morphis@gravedo.de>
---
 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
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-05 11:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 15:50 [PATCH] cmake.bbclass: set the rpath for binaries build with cmake to ${libdir} Simon Busch
2011-05-04 16:09 ` Phil Blundell
2011-05-04 16:19   ` Simon Busch
2011-05-04 16:54     ` Phil Blundell
2011-05-04 17:00       ` Simon Busch
2011-05-05  9:50         ` Phil Blundell
2011-05-05 11:21           ` Simon Busch
2011-05-05 11:34             ` Phil Blundell
2011-05-05 11:44               ` Simon Busch
2011-05-04 16:55     ` [PATCH] cmake.bbclass: set the rpath for native binaries build with cmake Simon Busch
2011-05-04 20:46       ` Simon Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.