Skip to content
Snippets Groups Projects
Commit b4df8d43 authored by Edric Milaret's avatar Edric Milaret Committed by Emmanuel Lepage Vallee
Browse files

Win32 Portablity patch

Win32 Portablity patch
parent a19f260f
Branches
Tags
No related merge requests found
......@@ -8,6 +8,10 @@ IF(POLICY CMP0043)
CMAKE_POLICY(SET CMP0043 NEW)
ENDIF(POLICY CMP0043)
IF(POLICY CMP0020)
CMAKE_POLICY(SET CMP0020 NEW)
ENDIF(POLICY CMP0020)
# First, check is the compiler is new enough, most version of Clang are fine
# until problems arise, checking for GCC is enough
IF (CMAKE_COMPILER_IS_GNUCC)
......@@ -504,7 +508,7 @@ IF(NOT ${ENABLE_STATIC} MATCHES false)
)
ENDIF()
QT5_USE_MODULES(ringclient Core)
QT5_USE_MODULES(ringclient Core Concurrent)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
QT5_USE_MODULES(ringclient DBus)
......@@ -579,6 +583,7 @@ STRING(REPLACE "${CMAKE_LIBRARY_ARCHITECTURE}" "" SANE_LIBRARY_PATH "${CMAKE_INS
INSTALL( TARGETS ringclient
ARCHIVE DESTINATION ${SANE_LIBRARY_PATH}
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${SANE_LIBRARY_PATH}
DESTINATION ${SANE_LIBRARY_PATH}
)
......
......@@ -20,6 +20,7 @@ FIND_LIBRARY(ring_BIN NAMES ring
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin
)
# Try a static version too
......@@ -32,7 +33,9 @@ IF(${ring_BIN} MATCHES "")
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
)
IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
ADD_DEFINITIONS(-fPIC)
ENDIF()
ENDIF()
......
# this one is important
SET(CMAKE_SYSTEM_NAME Windows)
# specify the cross compiler
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
SET(CMAKE_ASM_YASM_COMPILER yasm)
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32/)
set(LIB_FLAGS "-Wl,--output-def,libringclient.def")
\ No newline at end of file
......@@ -20,6 +20,24 @@
//System
#include <errno.h>
#ifdef _WIN32
#include <winerror.h>
#define ESHUTDOWN WSAESHUTDOWN
#define ENODATA WSANO_DATA
#define ETIME WSAETIMEDOUT
#define EPFNOSUPPORT WSAEPROTONOSUPPORT
#define EHOSTDOWN WSAEHOSTDOWN
#define ESTALE WSAESTALE
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define ETOOMANYREFS WSAETOOMANYREFS
#define EUSERS WSAEUSERS
#define EBADMSG 9905
#define ENOLINK 9918
#define ENOSR 9922
#define ENOSTR 9924
#define EMULTIHOP 2004
#endif
//Qt
#include <QtCore/QCoreApplication>
#include <QtCore/QDateTime>
......
......@@ -46,7 +46,7 @@ class CollectionConfigurationInterface;
/**
* Common elements for each CollectionManagerInterface
*/
class CollectionManagerInterfaceBase {
class LIB_EXPORT CollectionManagerInterfaceBase {
public:
virtual bool hasEnabledCollections (CollectionInterface::SupportedFeatures features = CollectionInterface::SupportedFeatures::NONE) const = 0;
virtual bool hasCollections (CollectionInterface::SupportedFeatures features = CollectionInterface::SupportedFeatures::NONE) const = 0;
......
......@@ -45,7 +45,7 @@ InstanceInterface::InstanceInterface() : m_pTimer(nullptr)
m_pTimer = new QTimer(this);
m_pTimer->setInterval(50);
connect(m_pTimer,&QTimer::timeout,this,&pollEvents);
connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pollEvents()));
m_pTimer->start();
ringFlags |= DRing::DRING_FLAG_DEBUG;
ringFlags |= DRing::DRING_FLAG_CONSOLE_LOG;
......@@ -70,7 +70,7 @@ InstanceInterface::~InstanceInterface()
}
void pollEvents()
void InstanceInterface::pollEvents()
{
DRing::pollEvents();
}
......
......@@ -40,7 +40,6 @@ class InstanceInterface: public QObject
Q_OBJECT
public:
InstanceInterface();
~InstanceInterface();
// TODO: These are not present in dring.h
......@@ -59,6 +58,8 @@ public Q_SLOTS: // METHODS
bool isConnected();
void pollEvents();
private:
QTimer* m_pTimer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment