[37] | 1 | project(Sick)
|
---|
| 2 |
|
---|
| 3 | ################################################################################
|
---|
[61] | 4 | add_definitions( -DSICK_EXPORTS )
|
---|
[37] | 5 | add_definitions( -DSICKLDMRS_EXPORTS )
|
---|
[61] | 6 | add_definitions( -DSICKLMS_EXPORTS )
|
---|
[37] | 7 |
|
---|
| 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 |
|
---|
| 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}
|
---|
| 32 | )
|
---|
| 33 |
|
---|
| 34 | # ========================================
|
---|
| 35 | # Link directories
|
---|
| 36 | # ========================================
|
---|
| 37 | link_directories( ${PACPUS_LIB_DIR}
|
---|
| 38 | )
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 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
|
---|
| 58 | ${PLUGIN_CPP}
|
---|
| 59 | )
|
---|
| 60 |
|
---|
| 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}
|
---|
| 72 | )
|
---|
| 73 |
|
---|
| 74 | set(
|
---|
| 75 | UI_FILES
|
---|
| 76 |
|
---|
| 77 | )
|
---|
| 78 |
|
---|
| 79 | # ========================================
|
---|
| 80 | # Call MOC
|
---|
| 81 | # ========================================
|
---|
| 82 | qt4_wrap_cpp(
|
---|
| 83 | PROJECT_MOC_SRCS
|
---|
| 84 | ${FILES_TO_MOC}
|
---|
| 85 | )
|
---|
| 86 |
|
---|
| 87 | qt4_wrap_ui(
|
---|
| 88 | PROJECT_UI_SRCS
|
---|
| 89 | ${UI_FILES}
|
---|
| 90 | )
|
---|
| 91 |
|
---|
| 92 | # ========================================
|
---|
| 93 | # Build a library
|
---|
| 94 | # ========================================
|
---|
| 95 | pacpus_add_library(
|
---|
| 96 | ${PROJECT_NAME} SHARED
|
---|
| 97 | ${PROJECT_SRCS}
|
---|
| 98 | ${PROJECT_MOC_SRCS}
|
---|
| 99 | ${PROJECT_UI_SRCS}
|
---|
| 100 | )
|
---|
| 101 |
|
---|
| 102 | message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
|
---|
| 103 |
|
---|
| 104 | set(LIBS
|
---|
| 105 | optimized FileLib debug FileLib_d
|
---|
| 106 | optimized PacpusLib debug PacpusLib_d
|
---|
| 107 | optimized PacpusTools debug PacpusTools_d
|
---|
| 108 | )
|
---|
| 109 | if (WIN32)
|
---|
| 110 | list(APPEND LIBS
|
---|
| 111 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 112 | )
|
---|
| 113 | 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 | ${LIBS}
|
---|
| 125 | )
|
---|
| 126 |
|
---|
| 127 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 128 |
|
---|
| 129 | # ========================================
|
---|
| 130 | # Install
|
---|
| 131 | # ========================================
|
---|
| 132 | pacpus_install(${PROJECT_NAME})
|
---|