From 23e714bf6ae4949b29cc8e6d539bc7217c2e24dc Mon Sep 17 00:00:00 2001
From: Francois Keith <keith@lirmm.fr>
Date: Thu, 23 May 2013 01:21:49 +0200
Subject: [PATCH] Update lib installation path (multiarch portability).

---
 CMakeLists.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b760e91..0c77a63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.4.6)
 include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
 
 include(cmake/base.cmake)
+include(cmake/GNUInstallDirs.cmake)
 
 set(ROS_BUILD_TYPE RelWithDebInfo)
 
@@ -80,7 +81,7 @@ pkg_config_use_dependency(ros_interpreter dynamic-graph)
 pkg_config_use_dependency(ros_interpreter sot-core)
 target_link_libraries(ros_interpreter ros_bridge)
 set_target_properties(ros_interpreter PROPERTIES BUILD_WITH_INSTALL_RPATH True)
-install(TARGETS ros_interpreter DESTINATION lib)
+install(TARGETS ros_interpreter DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
 # Stand alone remote dynamic-graph Python interpreter.
 rosbuild_add_executable(interpreter src/interpreter.cpp)
@@ -89,8 +90,8 @@ pkg_config_use_dependency(interpreter jrl-mal)
 pkg_config_use_dependency(interpreter dynamic-graph)
 pkg_config_use_dependency(interpreter sot-core)
 pkg_config_use_dependency(interpreter sot-dynamic)
-set_target_properties(interpreter PROPERTIES BUILD_WITH_INSTALL_RPATH True)
-install(TARGETS interpreter DESTINATION bin)
+# set_target_properties(interpreter PROPERTIES BUILD_WITH_INSTALL_RPATH True)
+#install(TARGETS interpreter DESTINATION bin)
 
 add_subdirectory(src)
 
-- 
GitLab