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
This commit is contained in:
Justin Knotzke
2009-08-01 16:52:49 -04:00
parent 9f65afff15
commit d500064da2

View File

@@ -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 + ".";