source: pacpusframework/trunk/src/PacpusSensor/CMakeLists.txt@ 11

Last change on this file since 11 was 7, checked in by sgosseli, 12 years ago

Use the Unix EOL instead of the Windows one.

File size: 2.6 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusSensor)
10
11# ========================================
12# Configure qt4
13# ========================================
14if(QT4_FOUND)
15 set(QT_USE_QTXML true)
16 set(QT_USE_QTNETWORK true)
17 include(${QT_USE_FILE})
18else()
19 message(ERROR "Qt4 needed")
20endif()
21
22# ========================================
23# Compiler definitions
24# ========================================
25add_definitions(
26 ${QT_DEFINITIONS}
27)
28
29# ========================================
30# Include directories
31# ========================================
32include_directories(
33 ${PROJECT_BINARY_DIR}
34 ${QT_INCLUDE_DIR}
35)
36
37# ========================================
38# List of sources
39# ========================================
40set(
41 PROJECT_SRCS
42 src/ui/pacpusmainwindow.cpp
43 src/ui/pacpusmainwindow.h
44 src/main.cpp
45)
46
47# ========================================
48# Qt4 stuff
49# ========================================
50set(SENSOR_UI_CLASSES src/ui/pacpusmainwindow.ui)
51set(SENSOR_MOC_CLASSES src/ui/pacpusmainwindow.h)
52qt4_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES})
53qt4_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES})
54source_group(Main_ui FILES ${PROJECT_SRCS} )
55source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H} )
56
57# ========================================
58# Build an executable
59# ========================================
60add_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
73target_link_libraries(
74 ${PROJECT_NAME}
75 dbiteplayerlib
76 FileLib
77 PacpusLib
78 PacpusTools
79 ${QT_LIBRARIES}
80)
81# Windows
82if (WIN32)
83 target_link_libraries(
84 ${PROJECT_NAME}
85 ROAD_TIME
86 Winmm
87 )
88endif()
89
90# ========================================
91# Properties
92# ========================================
93set_target_properties(
94 ${PROJECT_NAME}
95 PROPERTIES DEBUG_POSTFIX "_d"
96)
97
98# ========================================
99# Install directories
100# ========================================
101install(
102 TARGETS ${PROJECT_NAME}
103 RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
104 LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
105 ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
106)
Note: See TracBrowser for help on using the repository browser.