Changeset 99 in pacpussensors for trunk/Gps/CMakeLists.txt
- Timestamp:
- 10/15/15 14:47:01 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gps/CMakeLists.txt
r59 r99 1 #########################quick start############################################ 2 #cmake ../ -G "CodeBlocks - Unix Makefiles" 3 #make 4 #make install 5 #make clean 6 ################################################################################ 1 7 project(Gps) 8 set(${PROJECT_NAME}_VERSION_MAJOR 0) 9 set(${PROJECT_NAME}_VERSION_MINOR 1) 10 add_definitions( -DGPS_EXPORTS ) 2 11 ################################################################################ 12 create_export(EXPORT_HDR ${PROJECT_NAME}) 13 pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME}) 14 add_definitions (${QT_DEFINITIONS}) 3 15 4 add_definitions( -DGPS_EXPORTS ) 5 6 # ======================================== 7 # Configure qt4 8 # ======================================== 9 if(QT4_FOUND) 10 set(QT_USE_QTXML true) 11 set(QT_USE_QTNETWORK true) 12 include(${QT_USE_FILE}) 13 else() 14 message(ERROR "Qt4 needed") 15 endif() 16 17 # ======================================== 18 # Compiler definitions 19 # ======================================== 20 add_definitions( 21 ${QT_DEFINITIONS} 22 ) 23 24 # ======================================== 25 # Include directories 26 # ======================================== 27 include_directories( 28 ${PROJECT_BINARY_DIR} 29 ${QT_INCLUDE_DIR} 16 find_package(Qt5Network REQUIRED) 17 find_package(Qt5Widgets REQUIRED) 18 ################################################################################ 19 # DIRECTORIES 20 include_directories( 21 ${PROJECT_BINARY_DIR} 22 ${QT_INCLUDE_DIR} 23 ${PACPUS_INCLUDE_DIR} 24 ${PACPUS_INCLUDE_DIR}/Pacpus/ 30 25 ) 31 26 … … 38 33 39 34 40 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 41 42 # ======================================== 43 # List of sources 44 # ======================================== 45 set( 46 PROJECT_SRCS 47 gpsComponent.cpp 48 gpsComponent.h 49 GpsFrames.h 50 # SeptentrioSocket.h 51 # SeptentrioSocket.cpp 52 # SeptentrioComponent.h 53 # SeptentrioComponent.cpp 54 #UbloxComponent.h 55 #UbloxComponent.cpp 56 #polarxGPSTKsolver.cpp 57 # ui/polarxmainwindow.hpp 58 # ui/polarxmainwindow.cpp 35 ################################################################################ 36 # FILES 37 set(PROJECT_HDRS 38 ${EXPORT_HDR} 39 gpsComponent.h 40 GpsFrames.h 41 SeptentrioSocket.h 42 SbfFrames.h 43 structure_gps.h 44 xml/gps_nmea.xml 45 ) 46 set(PROJECT_SRCS 59 47 ${PLUGIN_CPP} 48 gpsComponent.cpp 49 SeptentrioSocket.cpp 50 ui/polarxmainwindow.cpp 60 51 ) 61 52 … … 76 67 endif(UNIX) 77 68 78 79 # ========================================80 # Files to MOC81 # ========================================82 83 69 if(UNIX) 84 70 set(FILES_TO_MOC 85 71 # add here the header files that you want to MOC 86 72 gpsComponent.h 87 SeptentrioComponent.h 73 GpsFrames.h 74 #SeptentrioComponent.h 88 75 SeptentrioSocket.h 89 76 ../driver/PosixSerialPort.h 90 77 ui/polarxmainwindow.hpp 91 ${PLUGIN_H}78 ${PLUGIN_HDR} 92 79 ) 93 80 endif(UNIX) … … 97 84 # add here the header files that you want to MOC 98 85 gpsComponent.h 99 #SeptentrioComponent.h100 #SeptentrioSocket.h86 # SeptentrioComponent.h 87 # SeptentrioSocket.h 101 88 ../driver/Win32SerialPort.h 102 # ui/polarxmainwindow.hpp103 ${PLUGIN_H }89 # ui/polarxmainwindow.hpp 90 ${PLUGIN_HDR} 104 91 ) 105 92 endif(WIN32) 106 93 107 set( 108 UI_FILES 94 set(UI_FILES 109 95 ) 110 96 111 # ======================================== 112 # Call MOC 113 # ======================================== 114 qt4_wrap_cpp( 115 PROJECT_MOC_SRCS 97 ################################################################################ 98 # Qt: call moc, uic 99 qt_wrap_cpp(PROJECT_MOC_SRCS 116 100 ${FILES_TO_MOC} 117 101 ) 118 102 119 qt4_wrap_ui( 120 PROJECT_UI_SRCS 103 qt_wrap_ui(PROJECT_UI_SRCS 121 104 ${UI_FILES} 122 105 ) 123 106 124 # ======================================== 125 # Build a library 126 # ======================================== 127 pacpus_add_library( 128 ${PROJECT_NAME} SHARED 107 ################################################################################ 108 # BUILD and LINK 109 pacpus_add_library(${PROJECT_NAME} SHARED 110 ${PROJECT_HDRS} 129 111 ${PROJECT_SRCS} 130 112 ${PROJECT_MOC_SRCS} … … 132 114 ) 133 115 116 134 117 # ======================================== 135 118 # Libraries 136 119 # ======================================== 137 if(WIN32) 138 set(LIBS 139 # add your specific libraries to link here 140 optimized NMEA0183LIB debug NMEA0183LIB_d 120 set(LIBS 121 optimized FileLib debug FileLib_d 122 optimized PacpusLib debug PacpusLib_d 123 optimized PacpusTools debug PacpusTools_d 124 optimized NMEA0183LIB debug NMEA0183LIB_d 125 ) 126 if (WIN32) 127 list(APPEND LIBS 128 optimized ROAD_TIME debug ROAD_TIME_d 141 129 ) 142 endif(WIN32) 143 144 if(UNIX) 145 set(LIBS 146 # add your specific libraries to link here 147 148 ) 149 endif(UNIX) 150 151 # All the platform 152 target_link_libraries( 153 ${PROJECT_NAME} 154 ${PACPUS_LIBRARIES} 155 ${QT_LIBRARIES} 156 ${PACPUS_DEPENDENCIES_LIB} 157 ${LIBS} 158 # optimized PacpusTools debug PacpusTools_d 159 ) 130 endif() 131 # LINK 132 target_link_libraries(${PROJECT_NAME} 133 ${PACPUS_LIBRARIES} 134 ${PACPUS_DEPENDENCIES_LIB} 135 ${LIBS} 136 ${QT_LIBRARIES} 137 ) 138 qt5_use_modules(${PROJECT_NAME} Network) 139 ################################################################################ 140 # FOLDERS 160 141 pacpus_folder(${PROJECT_NAME} "components") 161 162 # ======================================== 163 # Install 164 # ======================================== 165 pacpus_install(${PROJECT_NAME}) 142 ################################################################################ 143 # INSTALL 144 pacpus_install(${PROJECT_NAME})
Note:
See TracChangeset
for help on using the changeset viewer.