]> vaikene.ee Git - evaf/commitdiff
Added support for building under CYGWIN on Windows.
authorEnar Väikene <enar@vaikene.net>
Tue, 10 Sep 2013 06:37:58 +0000 (09:37 +0300)
committerEnar Väikene <enar@vaikene.net>
Tue, 10 Sep 2013 06:37:58 +0000 (09:37 +0300)
CMakeLists.txt
src/libs/Plugins/pluginmanager.cpp
src/libs/Plugins/pluginmanager.h

index ddff8df8ec7edd84f25150b0f5be7a1ab638f620..e7b58d0c24a31b8e75e87bfa719f3d467192860f 100644 (file)
@@ -1,5 +1,6 @@
 project(eVaf)
 
+set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
 cmake_minimum_required(VERSION 2.6.0)
 
 if(COMMAND cmake_policy)
index 21db40b018ba2e7f10f34a4d2c1a0b66a8eef175..dac188f4a6a4addd612fce260fc98dee043f6c1d 100644 (file)
@@ -369,6 +369,15 @@ bool PluginManagerPrivate::loadQtPlugin(QString const & name) const
     if (!QFile::exists(t))
         fileName = t;
 #  endif
+#endif
+
+#ifdef Q_OS_CYGWIN
+    fileName = QString("%1cygq%2.dll").arg(Common::iApp::instance()->qtPluginsDir()).arg(name);
+#  ifndef QT_NO_DEBUG
+    QString t = QString("%1libq%2.dll.debug").arg(Common::iApp::instance()->qtPluginsDir()).arg(name);
+    if (QFile::exists(t))
+        fileName = t;
+#  endif
 #endif
 
     if (fileName.isEmpty()) {
index c9806af14eda1916b3331612eeb1cacdb1997947..e56092225030843e3a7be50e38f1ff8e2b207990 100644 (file)
@@ -65,6 +65,8 @@ inline QString expandPluginName(QString const & name)
 #  endif
 #elif defined Q_OS_LINUX
     return "lib" + name + ".so";
+#elif defined Q_OS_CYGWIN
+    return "cyg" + name + ".dll";
 #else
     return name;
 #endif