[66] | 1 | project(Velodyne)
|
---|
| 2 |
|
---|
| 3 | ################################################################################
|
---|
| 4 | add_definitions( -DVELODYNEHDL64S2_EXPORTS )
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 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 | VelodyneComponent.cpp
|
---|
| 49 | VelodyneComponent.h
|
---|
| 50 | ${PLUGIN_CPP}
|
---|
| 51 | )
|
---|
| 52 |
|
---|
| 53 | # ========================================
|
---|
| 54 | # Files to MOC
|
---|
| 55 | # ========================================
|
---|
| 56 | set(
|
---|
| 57 | FILES_TO_MOC
|
---|
| 58 | VelodyneComponent.h
|
---|
| 59 | ${PLUGIN_H}
|
---|
| 60 | )
|
---|
| 61 |
|
---|
| 62 | set(
|
---|
| 63 | UI_FILES
|
---|
| 64 |
|
---|
| 65 | )
|
---|
| 66 |
|
---|
| 67 | # ========================================
|
---|
| 68 | # Call MOC
|
---|
| 69 | # ========================================
|
---|
| 70 | qt4_wrap_cpp(
|
---|
| 71 | PROJECT_MOC_SRCS
|
---|
| 72 | ${FILES_TO_MOC}
|
---|
| 73 | )
|
---|
| 74 |
|
---|
| 75 | qt4_wrap_ui(
|
---|
| 76 | PROJECT_UI_SRCS
|
---|
| 77 | ${UI_FILES}
|
---|
| 78 | )
|
---|
| 79 |
|
---|
| 80 | # ========================================
|
---|
| 81 | # Build a library
|
---|
| 82 | # ========================================
|
---|
| 83 | pacpus_add_library(
|
---|
| 84 | ${PROJECT_NAME} SHARED
|
---|
| 85 | ${PROJECT_SRCS}
|
---|
| 86 | ${PROJECT_MOC_SRCS}
|
---|
| 87 | ${PROJECT_UI_SRCS}
|
---|
| 88 | )
|
---|
| 89 |
|
---|
| 90 | message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
|
---|
| 91 |
|
---|
| 92 | set(LIBS
|
---|
| 93 | optimized FileLib debug FileLib_d
|
---|
| 94 | optimized PacpusLib debug PacpusLib_d
|
---|
| 95 | optimized PacpusTools debug PacpusTools_d
|
---|
| 96 | )
|
---|
| 97 | if (WIN32)
|
---|
| 98 | list(APPEND LIBS
|
---|
| 99 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 100 | )
|
---|
| 101 | endif()
|
---|
| 102 |
|
---|
| 103 | # ========================================
|
---|
| 104 | # Libraries
|
---|
| 105 | # ========================================
|
---|
| 106 | # All the platform
|
---|
| 107 | target_link_libraries(
|
---|
| 108 | ${PROJECT_NAME}
|
---|
| 109 | ${PACPUS_LIBRARIES}
|
---|
| 110 | ${QT_LIBRARIES}
|
---|
| 111 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
| 112 | ${LIBS}
|
---|
| 113 | )
|
---|
| 114 |
|
---|
| 115 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 116 |
|
---|
| 117 | # ========================================
|
---|
| 118 | # Install
|
---|
| 119 | # ========================================
|
---|
| 120 | pacpus_install(${PROJECT_NAME})
|
---|