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 | )
|
---|
25 | # ========================================
|
---|
26 | # Link directories
|
---|
27 | # ========================================
|
---|
28 | link_directories(
|
---|
29 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
30 | ${PROJECT_BINARY_DIR}/../FileLib
|
---|
31 | ${PROJECT_BINARY_DIR}/../RoadTime
|
---|
32 | )
|
---|
33 |
|
---|
34 | # ========================================
|
---|
35 | # List of sources
|
---|
36 | # ========================================
|
---|
37 | set(
|
---|
38 | PROJECT_SRCS
|
---|
39 | src/ui/pacpusmainwindow.cpp
|
---|
40 | src/ui/pacpusmainwindow.h
|
---|
41 | src/main.cpp
|
---|
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)
|
---|
49 |
|
---|
50 | qt_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES})
|
---|
51 | qt_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES})
|
---|
52 |
|
---|
53 | source_group(Main_ui FILES ${PROJECT_SRCS} )
|
---|
54 | source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H} )
|
---|
55 |
|
---|
56 | # ========================================
|
---|
57 | # Build an executable
|
---|
58 | # ========================================
|
---|
59 | pacpus_add_executable(
|
---|
60 | ${PROJECT_NAME}
|
---|
61 | ./src/main.cpp
|
---|
62 | ./src/ui/pacpusmainwindow.cpp
|
---|
63 | ./src/ui/pacpusmainwindow.h
|
---|
64 | ${SENSOR_MOC_SOURCES}
|
---|
65 | ${SENSOR_UI_CLASSES}
|
---|
66 | )
|
---|
67 |
|
---|
68 | # ========================================
|
---|
69 | # Libraries
|
---|
70 | # ========================================
|
---|
71 |
|
---|
72 | set(OPT_LIBRARIES
|
---|
73 | optimized FileLib debug FileLib_d
|
---|
74 | optimized PacpusLib debug PacpusLib_d
|
---|
75 | )
|
---|
76 |
|
---|
77 | # Windows platform
|
---|
78 | if(WIN32)
|
---|
79 | LIST(APPEND OPT_LIBRARIES
|
---|
80 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
81 | Winmm
|
---|
82 | )
|
---|
83 | endif()
|
---|
84 |
|
---|
85 | if(UNIX)
|
---|
86 | LIST(APPEND OPT_LIBRARIES
|
---|
87 | pthread
|
---|
88 | )
|
---|
89 | endif()
|
---|
90 |
|
---|
91 | # All the platform
|
---|
92 | target_link_libraries(
|
---|
93 | ${PROJECT_NAME}
|
---|
94 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
95 | ${OPT_LIBRARIES}
|
---|
96 | ${QT_LIBRARIES}
|
---|
97 | )
|
---|
98 |
|
---|
99 | # ========================================
|
---|
100 | # Install
|
---|
101 | # ========================================
|
---|
102 | pacpus_install(${PROJECT_NAME})
|
---|
103 |
|
---|
104 | # ========================================
|
---|
105 | # Folder
|
---|
106 | # ========================================
|
---|
107 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|