From: Enar Väikene Date: Tue, 10 Sep 2013 06:37:58 +0000 (+0300) Subject: Added support for building under CYGWIN on Windows. X-Git-Url: https://vaikene.ee/gitweb/overview.html?a=commitdiff_plain;h=7e6c580d1324e48375638b5f9ccbab4bff90f049;p=evaf Added support for building under CYGWIN on Windows. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ddff8df..e7b58d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/libs/Plugins/pluginmanager.cpp b/src/libs/Plugins/pluginmanager.cpp index 21db40b..dac188f 100644 --- a/src/libs/Plugins/pluginmanager.cpp +++ b/src/libs/Plugins/pluginmanager.cpp @@ -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()) { diff --git a/src/libs/Plugins/pluginmanager.h b/src/libs/Plugins/pluginmanager.h index c9806af..e560922 100644 --- a/src/libs/Plugins/pluginmanager.h +++ b/src/libs/Plugins/pluginmanager.h @@ -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