From d500064da2b2c1ad50ca82e0fdf87c5e7cfe757d Mon Sep 17 00:00:00 2001 From: Justin Knotzke Date: Sat, 1 Aug 2009 16:52:49 -0400 Subject: [PATCH] Fixed a small bug whereby we weren't deteting Linux correctly (or at all for that matter) It now uses the standard QMAKE -spec for #ifdefs --- src/D2XX.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/D2XX.cpp b/src/D2XX.cpp index d91134c86..6fa70c0c3 100644 --- a/src/D2XX.cpp +++ b/src/D2XX.cpp @@ -63,11 +63,13 @@ struct D2XXWrapper { ~D2XXWrapper() { if (handle) dlclose(handle); } bool init(QString &error) { -#ifdef WIN32 - const char *libname = "ftd2xx.dll"; -#else - const char *libname = "libftd2xx.dylib"; -#endif + #if defined(Q_OS_LINUX) + const char *libname = "libftd2xx.so"; + #elif defined(Q_OS_WIN32) + const char *libname = "ftd2xx.dll"; + #elif defined(Q_OS_DARWIN) + const char *libname = "libftd2xx.dylib"; + #endif handle = dlopen(libname, RTLD_NOW); if (!handle) { error = QString("Couldn't load library ") + libname + ".";