Changeset 99 in pacpussensors for trunk/Sick
- Timestamp:
- Oct 15, 2015, 2:47:01 PM (9 years ago)
- Location:
- trunk/Sick
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Sick/CMakeLists.txt
r71 r99 1 #########################quick start############################################ 2 #cmake ../ -G "CodeBlocks - Unix Makefiles" 3 #make 4 #make install 5 #make clean 6 ################################################################################ 1 7 project(Sick) 2 3 ################################################################################ 8 set(${PROJECT_NAME}_VERSION_MAJOR 0) 9 set(${PROJECT_NAME}_VERSION_MINOR 1) 4 10 add_definitions( -DSICK_EXPORTS ) 5 11 add_definitions( -DSICKLDMRS_EXPORTS ) 6 12 add_definitions( -DSICKLMS_EXPORTS ) 13 ################################################################################ 14 create_export(EXPORT_HDR ${PROJECT_NAME}) 15 pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME}) 16 add_definitions (${QT_DEFINITIONS}) 7 17 8 # ======================================== 9 # Configure qt4 10 # ======================================== 11 if(QT4_FOUND) 12 set(QT_USE_QTXML true) 13 set(QT_USE_QTNETWORK true) 14 include(${QT_USE_FILE}) 15 else() 16 message(ERROR "Qt4 needed") 17 endif() 18 find_package(OpenGL REQUIRED) 19 # ======================================== 20 # Compiler definitions 21 # ======================================== 22 add_definitions( 23 ${QT_DEFINITIONS} 24 ) 25 26 # ======================================== 27 # Include directories 28 # ======================================== 29 include_directories( 30 ${PROJECT_BINARY_DIR} 31 ${QT_INCLUDE_DIR} 18 find_package(Qt5Network REQUIRED) 19 ################################################################################ 20 # DIRECTORIES 21 include_directories( 22 ${PROJECT_BINARY_DIR} 23 ${QT_INCLUDE_DIR} 24 ${PACPUS_INCLUDE_DIR} 25 ${PACPUS_INCLUDE_DIR}/Pacpus/ 32 26 ) 33 27 … … 35 29 # Link directories 36 30 # ======================================== 37 link_directories( ${PACPUS_LIB_DIR} 31 link_directories( 32 ${PACPUS_LIB_DIR} 38 33 ) 39 34 40 35 41 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 42 43 # ======================================== 44 # List of sources 45 # ======================================== 46 set( 47 PROJECT_SRCS 48 SickComponent.h 49 SickComponent.cpp 50 AbstractSickSensor.h 51 AbstractSickSensor.cpp 52 SickLDMRSSensor.h 53 SickLDMRSSensor.cpp 54 SickLMSSensor.h 55 SickLMSSensor.cpp 56 SickSocket.h 57 SickSocket.cpp 36 ################################################################################ 37 # FILES 38 set(PROJECT_HDRS 39 ${EXPORT_HDR} 40 SickComponent.h 41 AbstractSickSensor.h 42 SickLDMRSSensor.h 43 SickLMSSensor.h 44 SickSocket.h 45 xml/${PROJECT_NAME}.xml 46 xml/${PROJECT_NAME}_d.xml 47 ) 48 set(PROJECT_SRCS 58 49 ${PLUGIN_CPP} 50 SickComponent.cpp 51 AbstractSickSensor.cpp 52 SickLDMRSSensor.cpp 53 SickLMSSensor.cpp 54 SickSocket.cpp 59 55 ) 60 56 61 # ======================================== 62 # Files to MOC 63 # ======================================== 64 set( 65 FILES_TO_MOC 66 SickComponent.h 67 SickLDMRSSensor.h 68 SickLMSSensor.h 69 AbstractSickSensor.h 70 SickSocket.h 71 ${PLUGIN_H} 57 set(FILES_TO_MOC 58 ${PLUGIN_HDR} 59 SickComponent.h 60 AbstractSickSensor.h 61 SickLDMRSSensor.h 62 SickLMSSensor.h 63 SickSocket.h 72 64 ) 73 65 74 set( 75 UI_FILES 76 66 set(UI_FILES 77 67 ) 78 68 79 # ======================================== 80 # Call MOC 81 # ======================================== 82 qt4_wrap_cpp( 83 PROJECT_MOC_SRCS 69 ################################################################################ 70 # Qt: call moc, uic 71 qt_wrap_cpp(PROJECT_MOC_SRCS 84 72 ${FILES_TO_MOC} 85 73 ) 86 74 87 qt4_wrap_ui( 88 PROJECT_UI_SRCS 75 qt_wrap_ui(PROJECT_UI_SRCS 89 76 ${UI_FILES} 90 77 ) 91 78 92 # ======================================== 93 # Build a library 94 # ======================================== 95 pacpus_add_library( 96 ${PROJECT_NAME} SHARED 79 ################################################################################ 80 # BUILD and LINK 81 pacpus_add_library(${PROJECT_NAME} SHARED 82 ${PROJECT_HDRS} 97 83 ${PROJECT_SRCS} 98 84 ${PROJECT_MOC_SRCS} … … 100 86 ) 101 87 102 message(STATUS ${PACPUS_DEPENDENCIES_LIB} )103 88 89 # ======================================== 90 # Libraries 91 # ======================================== 104 92 set(LIBS 105 93 optimized FileLib debug FileLib_d … … 112 100 ) 113 101 endif() 114 115 # ======================================== 116 # Libraries 117 # ======================================== 118 # All the platform 119 target_link_libraries( 120 ${PROJECT_NAME} 121 ${PACPUS_LIBRARIES} 122 ${QT_LIBRARIES} 123 ${PACPUS_DEPENDENCIES_LIB} 124 ${OPENGL_LIBRARIES} 125 ${LIBS} 126 ) 127 102 # LINK 103 target_link_libraries(${PROJECT_NAME} 104 ${PACPUS_LIBRARIES} 105 ${PACPUS_DEPENDENCIES_LIB} 106 ${LIBS} 107 ${QT_LIBRARIES} 108 ) 109 qt5_use_modules(${PROJECT_NAME} Network) 110 ################################################################################ 111 # FOLDERS 128 112 pacpus_folder(${PROJECT_NAME} "components") 129 130 # ======================================== 131 # Install 132 # ======================================== 133 pacpus_install(${PROJECT_NAME}) 113 ################################################################################ 114 # INSTALL 115 pacpus_install(${PROJECT_NAME}) -
trunk/Sick/SickSocket.cpp
r72 r99 97 97 mutex.lock(); 98 98 QTextStream os(socket); 99 os << data.to Ascii() << endl;99 os << data.toLatin1() << endl;//change in qt5 100 100 mutex.unlock(); 101 qDebug() << "data sent to server: " << data.to Ascii() ; //a adapter aussi101 qDebug() << "data sent to server: " << data.toLatin1() ; //a adapter aussi 102 102 } 103 103
Note:
See TracChangeset
for help on using the changeset viewer.