include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES} )
set(CMAKE_INCLUDE_CURRENT_DIR T)
# qplatformdefsinclude_directories(${QT_MKSPECS_DIR}/default)
set( QT_DONT_USE_QTGUI 1 )
include( ${QT_USE_FILE} )
find_package( Qt4 COMPONENTS QtCore REQUIRED )
set ( LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/debug CACHE string "Path to output library binaries." )
set( QT_DEFINITIONS -DUNICODE -DQT_NO_DEBUG -DQT_THREAD_SUPPORT)add_definitions( ${QT_DEFINITIONS})
if(BUILD_SHARED) add_library( ${LIB_TARGET} SHARED ${QSERIALDEVICE_SRCS} ${QSERIALDEVICE_MOCS} )else() add_library( ${LIB_TARGET} STATIC ${QSERIALDEVICE_SRCS} ${QSERIALDEVICE_MOCS} )endif()
set(SERIALDEVICE_BUILD_TYPE "SHARED") # or STATICadd_library( ${PROJECT_NAME} ${SERIALDEVICE_BUILD_TYPE} ${QSERIALDEVICE_SRCS} ${QSERIALDEVICE_MOCS} )
if( CMAKE_BUILD_TYPE STREQUAL "Debug" ) set ( LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/debug CACHE string "Path to output library binaries." ) set( LIB_TARGET "qserialdeviced" CACHE string "Name of the output library binaries." )else()
set(CMAKE_DEBUG_POSTFIX d)
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${ADDITIONAL_LIBRARY})
set_target_properties(exetarget PROPERTIES DEBUG_POSTFIX "_debug" VERSION ${VERSION})
C++ (Qt) enum BaudRateDirectionFlag { DirInput, DirOutput, DirAll };
C++ (Qt) enum BaudRate { Baud50, ... Baud115200 };
C++ (Qt) enum DataBits { Undefined = -1, Data5, Data6, Data7, Data8, };
C++ (Qt) enum Parity { Undefined = -1, None, Odd, Even, Mark, Space, };
C++ (Qt) enum StopBits { Undefined = -1, One, Half, Two, };
C++ (Qt) enum Flow { Undefined = -1, Off, Hardware, Software, };
C++ (Qt)enum BaudRate {/* Baud75 = 75, Baud110 = 110, Baud134 = 134, Baud150 = 150, Baud300 = 300, Baud600 = 600, */ Baud1200 = 1200, Baud1800 = 1800, Baud2400 = 2400, Baud4800 = 4800, Baud9600 = 9600, Baud19200 = 19200, Baud38400 = 38400, Baud57600 = 57600, Baud115200 = 115200};
C++ (Qt)enum Line { Le = 0x01, //Line enable (in) Dtr = 0x02, //Data Terminal Ready (out) Rts = 0x04, //Request To Send (out) St = 0x08, //Secondary TX (out) Sr = 0x10, //Secondary RX (in) Cts = 0x20, //Clear To Send (in) Dcd = 0x40, //Data Carrier Detect (in) Ri = 0x80, //Ring Indicator (in) Dsr = Le //Data Set Ready (in) alias for Le};Q_DECLARE_FLAGS(Lines, Line)