[7] | 1 | #################################################
|
---|
| 2 | # ___________ ____ ______ __ __ _____ #
|
---|
| 3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
| 4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
| 5 | # | __(____ /\___ > __/|____//____ > #
|
---|
| 6 | # |__| \/ \/|__| \/ #
|
---|
| 7 | # #
|
---|
| 8 | #################################################
|
---|
| 9 | project(PacpusSensor)
|
---|
| 10 |
|
---|
[3] | 11 | # ========================================
|
---|
[7] | 12 | # Configure qt4
|
---|
| 13 | # ========================================
|
---|
| 14 | if(QT4_FOUND)
|
---|
| 15 | set(QT_USE_QTXML true)
|
---|
| 16 | set(QT_USE_QTNETWORK true)
|
---|
| 17 | include(${QT_USE_FILE})
|
---|
| 18 | else()
|
---|
| 19 | message(ERROR "Qt4 needed")
|
---|
| 20 | endif()
|
---|
| 21 |
|
---|
| 22 | # ========================================
|
---|
| 23 | # Compiler definitions
|
---|
| 24 | # ========================================
|
---|
| 25 | add_definitions(
|
---|
| 26 | ${QT_DEFINITIONS}
|
---|
| 27 | )
|
---|
| 28 |
|
---|
| 29 | # ========================================
|
---|
| 30 | # Include directories
|
---|
| 31 | # ========================================
|
---|
| 32 | include_directories(
|
---|
| 33 | ${PROJECT_BINARY_DIR}
|
---|
| 34 | ${QT_INCLUDE_DIR}
|
---|
| 35 | )
|
---|
| 36 |
|
---|
| 37 | # ========================================
|
---|
| 38 | # List of sources
|
---|
| 39 | # ========================================
|
---|
| 40 | set(
|
---|
| 41 | PROJECT_SRCS
|
---|
| 42 | src/ui/pacpusmainwindow.cpp
|
---|
| 43 | src/ui/pacpusmainwindow.h
|
---|
| 44 | src/main.cpp
|
---|
| 45 | )
|
---|
| 46 |
|
---|
| 47 | # ========================================
|
---|
| 48 | # Qt4 stuff
|
---|
| 49 | # ========================================
|
---|
| 50 | set(SENSOR_UI_CLASSES src/ui/pacpusmainwindow.ui)
|
---|
| 51 | set(SENSOR_MOC_CLASSES src/ui/pacpusmainwindow.h)
|
---|
| 52 | qt4_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES})
|
---|
| 53 | qt4_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES})
|
---|
| 54 | source_group(Main_ui FILES ${PROJECT_SRCS} )
|
---|
| 55 | source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H} )
|
---|
| 56 |
|
---|
| 57 | # ========================================
|
---|
| 58 | # Build an executable
|
---|
| 59 | # ========================================
|
---|
[23] | 60 | pacpus_add_executable(
|
---|
[58] | 61 | ${PROJECT_NAME}
|
---|
| 62 | ./src/main.cpp
|
---|
| 63 | ./src/ui/pacpusmainwindow.cpp
|
---|
| 64 | ./src/ui/pacpusmainwindow.h
|
---|
| 65 | ${SENSOR_MOC_SOURCES}
|
---|
| 66 | ${SENSOR_UI_CLASSES}
|
---|
[7] | 67 | )
|
---|
| 68 |
|
---|
| 69 | # ========================================
|
---|
| 70 | # Libraries
|
---|
| 71 | # ========================================
|
---|
| 72 | # All the platform
|
---|
| 73 | target_link_libraries(
|
---|
[58] | 74 | ${PROJECT_NAME}
|
---|
[103] | 75 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
[58] | 76 | ${QT_LIBRARIES}
|
---|
[103] | 77 | PacpusLib
|
---|
[107] | 78 | FileLib
|
---|
[7] | 79 | )
|
---|
| 80 | # Windows
|
---|
[58] | 81 | if(WIN32)
|
---|
| 82 | target_link_libraries(
|
---|
| 83 | ${PROJECT_NAME}
|
---|
| 84 | ROAD_TIME
|
---|
| 85 | Winmm
|
---|
| 86 | )
|
---|
[7] | 87 | endif()
|
---|
| 88 |
|
---|
| 89 | # ========================================
|
---|
[23] | 90 | # Install
|
---|
[3] | 91 | # ========================================
|
---|
[23] | 92 | pacpus_install(${PROJECT_NAME})
|
---|
[7] | 93 |
|
---|
| 94 | # ========================================
|
---|
[23] | 95 | # Folder
|
---|
[7] | 96 | # ========================================
|
---|
[23] | 97 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|