diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffe31b3603fcb93b9a550c264fa017fdf56f1b5b..16f5c66663b690195377d48b67aabfa93addeca6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,8 +64,8 @@ LIST(APPEND libs dynamic)
 LIST(APPEND LOGGING_WATCHED_TARGETS ${libs})
 
 # Add dependency toward sot-dynamic library in pkg-config file.
-PKG_CONFIG_APPEND_LIBS_RAW(${CMAKE_INSTALL_PREFIX}/lib/plugin/dynamic.so)
-PKG_CONFIG_APPEND_LIBRARY_DIR(${CMAKE_INSTALL_PREFIX}/lib/plugin)
+PKG_CONFIG_APPEND_LIBS_RAW(${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/plugin/dynamic.so)
+PKG_CONFIG_APPEND_LIBRARY_DIR(${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/plugin)
 
 # Search for dependencies.
 # Boost
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 28c26aedfc09f39afdf92131a6c5d92d6a2b92e7..c0aa5265381578cfe8d3114be9f04ac70eb51bd6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -49,7 +49,7 @@ FOREACH(lib ${libs})
   PKG_CONFIG_USE_DEPENDENCY(${lib} dynamic-graph)
   PKG_CONFIG_USE_DEPENDENCY(${lib} jrl-mal)
 
-  INSTALL(TARGETS ${lib} DESTINATION lib/plugin)
+  INSTALL(TARGETS ${lib} DESTINATION ${CMAKE_INSTALL_LIBDIR}/plugin)
   # build python submodule
   STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${lib})
 
diff --git a/unitTesting/CMakeLists.txt b/unitTesting/CMakeLists.txt
index 55c6cb949385b14af0c77515c87ab7c945da873b..dd529b27c81b04108bfee7a9e1d6bb9e4449d744 100644
--- a/unitTesting/CMakeLists.txt
+++ b/unitTesting/CMakeLists.txt
@@ -73,7 +73,7 @@ FOREACH(test ${tests})
   IF (UNIX)
     SET(EXTRA_LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
     SET_PROPERTY(TEST ${test} PROPERTY 
-      ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_BINARY_DIR}/src:${BOOST_ROOT}/lib:${EXTRA_LD_LIBRARY_PATH}")
+      ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:${CMAKE_BINARY_DIR}/src:${BOOST_ROOT}/lib:${EXTRA_LD_LIBRARY_PATH}")
   ENDIF(UNIX)
 
 ENDFOREACH(test)