1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(PacpusSensor)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
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 | # ========================================
|
---|
60 | pacpus_add_executable(
|
---|
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}
|
---|
67 | )
|
---|
68 |
|
---|
69 | # ========================================
|
---|
70 | # Libraries
|
---|
71 | # ========================================
|
---|
72 | # All the platform
|
---|
73 | target_link_libraries(
|
---|
74 | ${PROJECT_NAME}
|
---|
75 | dbiteplayerlib
|
---|
76 | FileLib
|
---|
77 | PacpusLib
|
---|
78 | PacpusTools
|
---|
79 | ${QT_LIBRARIES}
|
---|
80 | )
|
---|
81 | # Windows
|
---|
82 | if (WIN32)
|
---|
83 | target_link_libraries(
|
---|
84 | ${PROJECT_NAME}
|
---|
85 | ROAD_TIME
|
---|
86 | Winmm
|
---|
87 | )
|
---|
88 | endif()
|
---|
89 |
|
---|
90 | # ========================================
|
---|
91 | # Install
|
---|
92 | # ========================================
|
---|
93 | pacpus_install(${PROJECT_NAME})
|
---|
94 |
|
---|
95 | # ========================================
|
---|
96 | # Folder
|
---|
97 | # ========================================
|
---|
98 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|