summaryrefslogtreecommitdiffstats
path: root/Source/cmDynamicLoader.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-02-16 15:48:54 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-02-16 15:48:54 (GMT)
commitc60f2fabc413ba79271d55301a7633435e21a865 (patch)
tree25629b39d2691d42da3e140993caffb06612f98b /Source/cmDynamicLoader.cxx
parent07b4d8bbca2ad9d4826d9d37b1ef9b19b6489879 (diff)
downloadCMake-c60f2fabc413ba79271d55301a7633435e21a865.zip
CMake-c60f2fabc413ba79271d55301a7633435e21a865.tar.gz
CMake-c60f2fabc413ba79271d55301a7633435e21a865.tar.bz2
ENH: use cmake variables for cmDynamicLoader to figure out library prefix and extensions
Diffstat (limited to 'Source/cmDynamicLoader.cxx')
-rw-r--r--Source/cmDynamicLoader.cxx59
1 files changed, 13 insertions, 46 deletions
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index 9f91dd8..14568bf 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -137,15 +137,6 @@ cmDynamicLoader::GetSymbolAddress(cmLibHandle lib, const char* sym)
return *reinterpret_cast<cmDynamicLoaderFunction*>(&result);
}
-const char* cmDynamicLoader::LibPrefix()
-{
- return "lib";
-}
-
-const char* cmDynamicLoader::LibExtension()
-{
- return ".sl";
-}
const char* cmDynamicLoader::LastError()
{
@@ -204,16 +195,6 @@ cmDynamicLoader::GetSymbolAddress(cmLibHandle /* lib */, const char* sym)
return *reinterpret_cast<cmDynamicLoaderFunction*>(&result);
}
-const char* cmDynamicLoader::LibPrefix()
-{
- return "lib";
-}
-
-const char* cmDynamicLoader::LibExtension()
-{
- return ".so";
-}
-
const char* cmDynamicLoader::LastError()
{
return 0;
@@ -272,19 +253,6 @@ cmDynamicLoader::GetSymbolAddress(cmLibHandle lib, const char* sym)
return *reinterpret_cast<cmDynamicLoaderFunction*>(&result);
}
-const char* cmDynamicLoader::LibPrefix()
-{
-#if defined( __MINGW32__ )
- return "lib";
-#else
- return "";
-#endif
-}
-
-const char* cmDynamicLoader::LibExtension()
-{
- return ".dll";
-}
const char* cmDynamicLoader::LastError()
{
@@ -346,20 +314,6 @@ cmDynamicLoader::GetSymbolAddress(cmLibHandle lib, const char* sym)
return *reinterpret_cast<cmDynamicLoaderFunction*>(&result);
}
-const char* cmDynamicLoader::LibPrefix()
-{
- return "lib";
-}
-
-const char* cmDynamicLoader::LibExtension()
-{
-#ifdef __CYGWIN__
- return ".dll";
-#else
- return ".so";
-#endif
-}
-
const char* cmDynamicLoader::LastError()
{
return dlerror();
@@ -370,3 +324,16 @@ void cmDynamicLoader::FlushCache()
{
cmDynamicLoaderCache::GetInstance()->FlushCache();
}
+
+// Stay consistent with the Modules/Platform directory as
+// to what the correct prefix and lib extension
+const char* cmDynamicLoader::LibPrefix()
+{
+ return CMAKE_SHARED_MODULE_PREFIX;
+}
+
+const char* cmDynamicLoader::LibExtension()
+{
+ return CMAKE_SHARED_LIBRARY_SUFFIX;
+}
+