- Timestamp:
- Jul 15, 2013, 4:59:37 PM (11 years ago)
- Location:
- branches/2.0-beta1
- Files:
-
- 2 added
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0-beta1/cmake/PacpusDependencies.cmake
r119 r120 42 42 find_package(Qt5OpenGL REQUIRED) 43 43 find_package(Qt5Network REQUIRED) 44 find_package(Qt5SerialPort REQUIRED) 44 45 45 46 set(QT_DEFINITIONS … … 50 51 ${Qt5OpenGL_DEFINITIONS} 51 52 ${Qt5Network_DEFINITIONS} 53 ${Qt5SerialPort_DEFINITIONS} 52 54 ) 53 55 set(QT_INCLUDE_DIR … … 58 60 ${Qt5OpenGL_INCLUDE_DIRS} 59 61 ${Qt5Network_INCLUDE_DIRS} 62 ${Qt5SerialPort_INCLUDE_DIRS} 60 63 ) 61 64 … … 67 70 ${Qt5OpenGL_LIBRARIES} 68 71 ${Qt5Network_LIBRARIES} 72 ${Qt5SerialPort_LIBRARIES} 69 73 ) 70 74 -
branches/2.0-beta1/cmake/PacpusUtilities.cmake
r99 r120 8 8 ################################################# 9 9 10 # ======================================== 11 # Create a Pacpus plugin 10 11 # TODO Compatibility macro 12 ## ======================================== 13 ## Qt macro compatibility Qt4 / Qt5 14 ## ======================================== 15 #function(qt_wrap_moc MOC_SRCS FILES_TO_MOC) 16 17 # if(QT4_FOUNDED) 18 # qt4_wrap_cpp(TEMP_VAR ${FILES_TO_MOC}) 19 20 # elseif(Qt5Core_FOUND) 21 # qt5_wrap_cpp(${MOC_SRCS} ${FILES_TO_MOC} PARENT_SCOPE) 22 23 # else() 24 # message(WARNING "QT ui found, can't wrap moc File") 25 # endif() 26 27 # #set(${MOC_SRCS} ${TEMP_VAR} PARENT_SCOPE) 28 29 #endfunction(qt_wrap_moc) 30 31 ## ======================================== 32 ## Qt macro compatibility Qt4 / Qt5 33 ## ======================================== 34 #function(qt_wrap_ui UI_SRCS UI_FILES) 35 # if(QT4_FOUND) 36 # qt4_wrap_ui( TEMP_VAR ${UI_FILES}) 37 38 # elseif(Qt5Core_FOUND) 39 # qt5_wrap_ui( TEMP_VAR ${UI_FILES}) 40 41 # else() 42 # message(WARNING "QT ui found, can't wrap ui File") 43 # endif() 44 45 # set(${UI_SRCS} ${TEMP_VAR} PARENT_SCOPE) 46 #endfunction() 47 48 # ======================================== 49 # Generic macro for Pacpus plugin 12 50 # ======================================== 13 51 function(PACPUS_PLUGIN OUT_CPP OUT_H PLUGIN_NAME) 52 53 if(QT4_FOUND) 54 pacpus_plugin_qt4(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 55 56 elseif(Qt5Core_FOUND) 57 pacpus_plugin_qt5(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 58 59 else() 60 message(WARNING "QT not found, can't create Plugin") 61 endif() 62 63 64 endfunction(PACPUS_PLUGIN) 65 66 # ======================================== 67 # Create a Pacpus plugin QT4 68 # ======================================== 69 function(PACPUS_PLUGIN_QT4 OUT_CPP OUT_H PLUGIN_NAME) 70 71 set(PLUGIN_NAME ${PLUGIN_NAME}Plugin) 72 set(${OUT_CPP} ${PLUGIN_NAME}.cpp PARENT_SCOPE) 73 set(${OUT_H} ${PLUGIN_NAME}.h PARENT_SCOPE) 74 75 string(TOUPPER ${PLUGIN_NAME} PLUGIN_NAME_UPPER) 76 77 # create the header file 78 file(WRITE ${PLUGIN_NAME}.h 79 "// Autogenerated file by PacpusPlugin.cmake\n" 80 "// DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE\n" 81 "\n" 82 "#ifndef __${PLUGIN_NAME_UPPER}_H__\n" 83 "#define __${PLUGIN_NAME_UPPER}_H__\n" 84 "\n" 85 "#include <QObject>\n" 86 "#include <qplugin.h>\n" 87 "\n" 88 "#include <Pacpus/kernel/PacpusPluginInterface.h>\n" 89 "\n" 90 "/// Auto-generated plugin class\n" 91 "class ${PLUGIN_NAME}\n" 92 " : public QObject\n" 93 " , public PacpusPluginInterface\n" 94 "{\n" 95 " Q_OBJECT\n" 96 " Q_INTERFACES(PacpusPluginInterface)\n" 97 "\n" 98 "public:\n" 99 " ${PLUGIN_NAME}();\n" 100 " ~${PLUGIN_NAME}();\n" 101 "\n" 102 "protected:\n" 103 " QString name();\n" 104 "};\n" 105 "\n" 106 "#endif // __${PLUGIN_NAME_UPPER}_H__\n" 107 ) 108 109 # create the cpp file 110 file(WRITE ${PLUGIN_NAME}.cpp 111 "// Autogenerated file by PacpusPlugin.cmake\n" 112 "// DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE\n" 113 "\n" 114 "#include \"${PLUGIN_NAME}.h\"\n" 115 "\n" 116 "${PLUGIN_NAME}::${PLUGIN_NAME}()\n" 117 "{\n" 118 "}\n" 119 "\n" 120 "${PLUGIN_NAME}::~${PLUGIN_NAME}()\n" 121 "{\n" 122 "}\n" 123 "\n" 124 "QString ${PLUGIN_NAME}::name()\n" 125 "{\n" 126 " return \"${PLUGIN_NAME}\";\n" 127 "}\n" 128 "\n" 129 "Q_EXPORT_PLUGIN2(${PLUGIN_NAME}, ${PLUGIN_NAME})\n" 130 ) 131 endfunction(PACPUS_PLUGIN_QT4) 132 133 # ======================================== 134 # Create a Pacpus plugin QT5 135 # ======================================== 136 function(PACPUS_PLUGIN_QT5 OUT_CPP OUT_H PLUGIN_NAME) 14 137 15 138 set(PLUGIN_NAME ${PLUGIN_NAME}Plugin) … … 82 205 "}\n" 83 206 ) 84 endfunction(PACPUS_PLUGIN )207 endfunction(PACPUS_PLUGIN_QT5) 85 208 86 209 # ======================================== -
branches/2.0-beta1/include/Pacpus/kernel/ComponentBase.h
r110 r120 113 113 114 114 // virtual QString getType() = 0; 115 116 virtual void addInput(); 117 118 virtual void addOutput(); 115 119 116 120 protected: -
branches/2.0-beta1/src/DBITEPlayer/CMakeLists.txt
r111 r120 67 67 # Libraries & Dependencies 68 68 # ======================================== 69 70 set(OPT_LIBRARIES 71 optimized dbiteplayerlib debug dbiteplayerlib_d 72 optimized FileLib debug FileLib_d 73 optimized PacpusLib debug PacpusLib_d 74 ) 75 69 76 # Windows platform 70 77 if(WIN32) 71 set(LIBS78 LIST(APPEND OPT_LIBRARIES 72 79 optimized ROAD_TIME debug ROAD_TIME_d 73 80 Winmm 74 )81 ) 75 82 endif() 76 83 … … 79 86 ${PROJECT_NAME} 80 87 ${QT_LIBRARIES} 81 ${ LIBS}88 ${OPT_LIBRARIES} 82 89 ${PACPUS_DEPENDENCIES_LIB} 83 optimized dbiteplayerlib debug dbiteplayerlib_d84 optimized FileLib debug FileLib_d85 optimized PacpusLib debug PacpusLib_d86 90 ) 87 91 -
branches/2.0-beta1/src/DBITEPlayerLib/CMakeLists.txt
r111 r120 88 88 # Libraries 89 89 # ======================================== 90 set(OPT_LIBRARIES 91 optimized FileLib debug FileLib_d 92 optimized PacpusLib debug PacpusLib_d 93 ) 94 90 95 # Windows platform 91 96 if(WIN32) 92 set(LIBS97 LIST(APPEND OPT_LIBRARIES 93 98 optimized ROAD_TIME debug ROAD_TIME_d 94 99 Winmm … … 100 105 ${PROJECT_NAME} 101 106 ${PACPUS_DEPENDENCIES_LIB} 102 ${LIBS} 103 optimized FileLib debug FileLib_d 104 optimized PacpusLib debug PacpusLib_d 107 ${OPT_LIBRARIES} 105 108 ${QT_LIBRARIES} 106 109 ) -
branches/2.0-beta1/src/PacpusLib/CMakeLists.txt
r111 r120 65 65 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/inputOutputInterface.h 66 66 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusEvent.h 67 #${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ CommunicationComponent.h67 #${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpusStruct.h 68 68 69 69 ./ComponentBase.cpp … … 75 75 ./XmlConfigFile.cpp 76 76 ./inputOutputBase.cpp 77 #./pacpusStruct.cpp 77 78 ) 78 79 … … 82 83 ) 83 84 84 85 qt5_wrap_cpp( 85 86 PROJECT_MOC_SRCS 86 87 ${FILES_TO_MOC} … … 97 98 98 99 if(UNIX) 99 set(LIBS optimized FileLib debug FileLib_d)100 set(OPT_LIBRARIES optimized FileLib debug FileLib_d) 100 101 else() 101 set(LIBS 102 optimized ROAD_TIME debug ROAD_TIME_d 103 ) 102 set(OPT_LIBRARIES optimized ROAD_TIME debug ROAD_TIME_d) 104 103 endif() 105 104 … … 111 110 ${QT_LIBRARIES} 112 111 ${PACPUS_DEPENDENCIES_LIB} 113 ${ LIBS}112 ${OPT_LIBRARIES} 114 113 ) 115 114 -
branches/2.0-beta1/src/PacpusLib/ComponentBase.cpp
r110 r120 104 104 } 105 105 } 106 107 void ComponentBase::addInput() 108 { 109 110 } 111 112 void ComponentBase::addOutput() 113 { 114 115 } -
branches/2.0-beta1/src/PacpusLib/ComponentManager.cpp
r110 r120 263 263 LOG_WARN("component '" << componentName << "' does not exist"); 264 264 } else { 265 // Pacpus 2.0 : add input and output 266 component->addInput(); 267 component->addOutput(); 268 265 269 if (component->configuration_ == ComponentBase::CONFIGURATION_DELAYED) { 266 270 LOG_DEBUG("try to configure component '" << componentName << "'"); … … 299 303 int connectionPriority = cfg.getConnectionPriority(); 300 304 305 306 //TODO set connection mode from string 307 308 //InputInterfaceBase::GetLast; 309 //InputInterfaceBase::NeverSkip; 310 //InputInterfaceBase::TimeBounded; 311 312 301 313 if (!createConnection(connectionOutput, connectionInput, connectionType,connectionPriority)) { 302 314 LOG_ERROR("cannot create connection '" << connectionOutput+"=>"+connectionInput << "'"); 303 315 continue; 304 316 } 305 } 317 } // for 306 318 307 319 return componentMap_.count(); -
branches/2.0-beta1/src/PacpusSensor/CMakeLists.txt
r111 r120 29 29 ${PROJECT_BINARY_DIR}/../PacpusLib 30 30 ${PROJECT_BINARY_DIR}/../FileLib 31 ${PROJECT_BINARY_DIR}/../PacpusTools 31 32 ) 32 33 … … 46 47 set(SENSOR_UI_CLASSES src/ui/pacpusmainwindow.ui) 47 48 set(SENSOR_MOC_CLASSES src/ui/pacpusmainwindow.h) 49 48 50 qt5_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES}) 49 51 qt5_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES}) 52 50 53 source_group(Main_ui FILES ${PROJECT_SRCS} ) 51 54 source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H} ) … … 66 69 # Libraries 67 70 # ======================================== 71 72 set(OPT_LIBRARIES 73 optimized FileLib debug FileLib_d 74 optimized PacpusLib debug PacpusLib_d 75 optimized PacpusTools debug PacpusTools_d 76 ) 77 68 78 # Windows platform 69 79 if(WIN32) 70 set(LIBS80 LIST(APPEND OPT_LIBRARIES 71 81 optimized ROAD_TIME debug ROAD_TIME_d 72 82 Winmm … … 78 88 ${PROJECT_NAME} 79 89 ${PACPUS_DEPENDENCIES_LIB} 80 optimized FileLib debug FileLib_d 81 optimized PacpusLib debug PacpusLib_d 82 ${LIBS} 90 ${OPT_LIBRARIES} 83 91 ${QT_LIBRARIES} 84 92 ) -
branches/2.0-beta1/src/PacpusTools/CMakeLists.txt
r119 r120 40 40 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/geodesie.h 41 41 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h 42 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h42 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h 43 43 ./src/matrice.cpp 44 44 ./src/geodesie.cpp 45 45 ./src/AsyncWorkerBase.cpp 46 46 ./src/PeriodicWorker.cpp 47 #./src/PacpusSerialPort.cpp47 ./src/PacpusSerialPort.cpp 48 48 ) 49 49 … … 55 55 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h 56 56 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h 57 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h57 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h 58 58 ) 59 59
Note:
See TracChangeset
for help on using the changeset viewer.