[89] | 1 | #################################################
|
---|
| 2 | # ___________ ____ ______ __ __ _____ #
|
---|
| 3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
| 4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
| 5 | # | __(____ /\___ > __/|____//____ > #
|
---|
| 6 | # |__| \/ \/|__| \/ #
|
---|
| 7 | # #
|
---|
| 8 | #################################################
|
---|
| 9 | project(PacpusSensor)
|
---|
| 10 |
|
---|
| 11 | # ========================================
|
---|
| 12 | # Compiler definitions
|
---|
| 13 | # ========================================
|
---|
| 14 | add_definitions(
|
---|
[331] | 15 | ${QT_DEFINITIONS}
|
---|
[89] | 16 | )
|
---|
| 17 |
|
---|
| 18 | # ========================================
|
---|
| 19 | # Include directories
|
---|
| 20 | # ========================================
|
---|
| 21 | include_directories(
|
---|
[331] | 22 | ${PROJECT_BINARY_DIR}
|
---|
| 23 | ${QT_INCLUDE_DIR}
|
---|
[89] | 24 | )
|
---|
[110] | 25 | # ========================================
|
---|
| 26 | # Link directories
|
---|
| 27 | # ========================================
|
---|
| 28 | link_directories(
|
---|
[331] | 29 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
| 30 | ${PROJECT_BINARY_DIR}/../FileLib
|
---|
[123] | 31 | ${PROJECT_BINARY_DIR}/../RoadTime
|
---|
[110] | 32 | )
|
---|
[89] | 33 |
|
---|
| 34 | # ========================================
|
---|
| 35 | # List of sources
|
---|
| 36 | # ========================================
|
---|
| 37 | set(
|
---|
[331] | 38 | PROJECT_SRCS
|
---|
| 39 | src/ui/pacpusmainwindow.cpp
|
---|
| 40 | src/ui/pacpusmainwindow.h
|
---|
| 41 | src/main.cpp
|
---|
[89] | 42 | )
|
---|
| 43 |
|
---|
| 44 | # ========================================
|
---|
| 45 | # Qt4 stuff
|
---|
| 46 | # ========================================
|
---|
| 47 | set(SENSOR_UI_CLASSES src/ui/pacpusmainwindow.ui)
|
---|
| 48 | set(SENSOR_MOC_CLASSES src/ui/pacpusmainwindow.h)
|
---|
[120] | 49 |
|
---|
[140] | 50 | qt_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES})
|
---|
| 51 | qt_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES})
|
---|
[120] | 52 |
|
---|
[331] | 53 | source_group(Main_ui FILES ${PROJECT_SRCS})
|
---|
| 54 | source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H})
|
---|
[89] | 55 |
|
---|
| 56 | # ========================================
|
---|
| 57 | # Build an executable
|
---|
| 58 | # ========================================
|
---|
| 59 | pacpus_add_executable(
|
---|
[331] | 60 | ${PROJECT_NAME}
|
---|
| 61 | ./src/main.cpp
|
---|
| 62 | ./src/ui/pacpusmainwindow.cpp
|
---|
| 63 | ./src/ui/pacpusmainwindow.h
|
---|
| 64 | ../ico/heudiasycIco.rc
|
---|
| 65 | ${SENSOR_MOC_SOURCES}
|
---|
| 66 | ${SENSOR_UI_CLASSES}
|
---|
[89] | 67 | )
|
---|
| 68 |
|
---|
| 69 | # ========================================
|
---|
| 70 | # Libraries
|
---|
| 71 | # ========================================
|
---|
[120] | 72 |
|
---|
| 73 | set(OPT_LIBRARIES
|
---|
[331] | 74 | optimized FileLib debug FileLib_d
|
---|
| 75 | optimized PacpusLib debug PacpusLib_d
|
---|
[120] | 76 | )
|
---|
| 77 |
|
---|
[111] | 78 | # Windows platform
|
---|
| 79 | if(WIN32)
|
---|
[331] | 80 | LIST(APPEND OPT_LIBRARIES
|
---|
| 81 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 82 | Winmm
|
---|
[111] | 83 | )
|
---|
| 84 | endif()
|
---|
| 85 |
|
---|
[150] | 86 | if(UNIX)
|
---|
[331] | 87 | LIST(APPEND OPT_LIBRARIES
|
---|
| 88 | pthread
|
---|
| 89 | )
|
---|
[150] | 90 | endif()
|
---|
| 91 |
|
---|
[89] | 92 | # All the platform
|
---|
| 93 | target_link_libraries(
|
---|
[331] | 94 | ${PROJECT_NAME}
|
---|
| 95 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
| 96 | ${OPT_LIBRARIES}
|
---|
| 97 | ${QT_LIBRARIES}
|
---|
[89] | 98 | )
|
---|
| 99 |
|
---|
| 100 | # ========================================
|
---|
| 101 | # Install
|
---|
| 102 | # ========================================
|
---|
| 103 | pacpus_install(${PROJECT_NAME})
|
---|
| 104 |
|
---|
| 105 | # ========================================
|
---|
| 106 | # Folder
|
---|
| 107 | # ========================================
|
---|
| 108 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|