From 7e6c580d1324e48375638b5f9ccbab4bff90f049 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enar=20V=C3=A4ikene?= Date: Tue, 10 Sep 2013 09:37:58 +0300 Subject: [PATCH] Added support for building under CYGWIN on Windows. --- CMakeLists.txt | 1 + src/libs/Plugins/pluginmanager.cpp | 9 +++++++++ src/libs/Plugins/pluginmanager.h | 2 ++ 3 files changed, 12 insertions(+) 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 -- 2.47.0