|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-29 08:21:38
|
Module: performous
Branch: dance
Commit: 3b4d9cb3ec6be92a90ebf35cc7c40e40674c705e
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 17 14:07:44 2009 +0100
Made loader plugin aware of LIB_SUFFIX - this fix installation on non standard prefix with custom LIB_SUFFIX
---
libs/plugin++/CMakeLists.txt | 2 ++
libs/plugin++/src/loader.cc | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index b85f1a3..b92b983 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -15,6 +15,8 @@ find_package(Boost 1.36 REQUIRED COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(plugin++ ${Boost_LIBRARIES})
+add_definitions("-DLIB_SUFFIX=\"${LIB_SUFFIX}\"")
+
if(NOT WIN32)
target_link_libraries(plugin++ dl)
endif()
diff --git a/libs/plugin++/src/loader.cc b/libs/plugin++/src/loader.cc
index 199698c..b39c8eb 100644
--- a/libs/plugin++/src/loader.cc
+++ b/libs/plugin++/src/loader.cc
@@ -50,13 +50,13 @@ loader::loader(fs::path const& folder) {
fs::path p = execname();
p = p.parent_path().parent_path();
if (!p.empty()) {
- p /= "lib" / folder;
+ p /= "lib" LIB_SUFFIX / folder;
if (fs::is_directory(p)) paths.insert(p);
}
#ifndef _WIN32
// Try UNIX library paths
parse(paths, std::getenv("LD_LIBRARY_PATH"), folder);
- parse(paths, "/usr/lib:/usr/local/lib", folder);
+ parse(paths, "/usr/lib" LIB_SUFFIX ":/usr/local/lib" LIB_SUFFIX, folder);
#endif
}
// Load the contents of each folder
|