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