File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434#include < QMutexLocker>
3535#include < QPainter>
3636#include < QPrinterInfo>
37- #include < QSerialPort>
38- #include < QSerialPortInfo>
37+ #ifdef HAVE_SerialPort
38+ #include < QSerialPort>
39+ #include < QSerialPortInfo>
40+ #endif
3941#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
4042 #include < QSoundEffect>
4143#else
@@ -2498,6 +2500,7 @@ int CBackendFreeRDP::RedirectionPrinter()
24982500
24992501int CBackendFreeRDP::RedirectionSerial ()
25002502{
2503+ #if HAVE_SerialPort
25012504 // TODO: FreeRDP don't support
25022505 return 0 ;
25032506 rdpContext* pRdpContext = (rdpContext*)m_pContext;
@@ -2532,6 +2535,7 @@ int CBackendFreeRDP::RedirectionSerial()
25322535 return -1 ;
25332536 }
25342537 }
2538+ #endif
25352539
25362540 return 0 ;
25372541}
Original file line number Diff line number Diff line change @@ -59,13 +59,18 @@ if(MINGW)
5959 set (FreeRDP_OPTIONS -fpermissive)
6060endif ()
6161
62- set (FreeRDP_QT_COMPONENTS Widgets Multimedia PrintSupport SerialPort )
62+ set (FreeRDP_QT_COMPONENTS Widgets Multimedia PrintSupport)
6363find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${FreeRDP_QT_COMPONENTS} )
6464if (Qt${QT_VERSION_MAJOR} _FOUND)
6565 FOREACH (_COMPONENT ${FreeRDP_QT_COMPONENTS} )
6666 list (APPEND FreeRDP_LIBS Qt${QT_VERSION_MAJOR} ::${_COMPONENT} )
6767 ENDFOREACH ()
6868endif ()
69+ find_package (Qt${QT_VERSION_MAJOR} COMPONENTS SerialPort )
70+ if (Qt${QT_VERSION_MAJOR} _FOUND)
71+ list (APPEND FreeRDP_DEFINITIONS HAVE_SerialPort)
72+ endif ()
73+
6974ADD_PLUGIN_TARGET (NAME PluginClient${PROJECT_NAME}
7075 ISPLUGIN
7176 SOURCE_FILES ${FreeRDP_SOURCE_FILES} ${FreeRDP_HEADER_FILES} ${FreeRDP_UI_FILES}
You can’t perform that action at this time.
0 commit comments