source: pacpussensors/trunk/CanGateway/CMakeLists.txt@ 1

Last change on this file since 1 was 1, checked in by DHERBOMEZ Gérald, 11 years ago

ajout des capteurs CanGateway et Alasca

File size: 2.9 KB
Line 
1project(CanGateway)
2################################################################################
3
4add_definitions( -DCANGATEWAY_EXPORTS )
5add_definitions( -DDBTRAWCANREADER_EXPORTS )
6
7# ========================================
8# Configure qt4
9# ========================================
10if(QT4_FOUND)
11 set(QT_USE_QTXML true)
12 set(QT_USE_QTNETWORK true)
13 include(${QT_USE_FILE})
14else()
15 message(ERROR "Qt4 needed")
16endif()
17
18# ========================================
19# Compiler definitions
20# ========================================
21add_definitions(
22 ${QT_DEFINITIONS}
23)
24
25# ========================================
26# Include directories
27# ========================================
28include_directories(
29 ${PROJECT_BINARY_DIR}
30 ${QT_INCLUDE_DIR}
31)
32
33# ========================================
34# Link directories
35# ========================================
36link_directories(
37)
38
39pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
40
41# ========================================
42# List of sources
43# ========================================
44set(
45 PROJECT_SRCS
46 CanFrameBase.h
47 CanDecoderBase.cpp
48 CanDecoderBase.h
49 CanGateway.cpp
50 CanGateway.h
51 CanSubscription.cpp
52 CanSubscription.h
53 Win32CanInterface.cpp
54 Win32CanInterface.h
55 DbtRawCanReader.h
56 DbtRawCanReader.cpp
57 ${PLUGIN_CPP}
58)
59
60if(WIN32)
61 list(APPEND PROJECT_SRCS
62 driver/VectorCanDriver.cpp
63 driver/VectorCanDriver.h
64 driver/XLVectorCanDriver.cpp
65 driver/XLVectorCanDriver.h
66 )
67endif(WIN32)
68if(UNIX)
69 list(APPEND PROJECT_SRCS
70 driver/PeakCanDriver.cpp
71 driver/PeakCanDriver.h
72 )
73endif(UNIX)
74
75# ========================================
76# Files to MOC
77# ========================================
78
79set(
80 FILES_TO_MOC
81 CanGateway.h
82 DbtRawCanReader.h
83 ${PLUGIN_H}
84)
85
86set(
87 UI_FILES
88)
89
90# ========================================
91# Call MOC
92# ========================================
93qt4_wrap_cpp(
94 PROJECT_MOC_SRCS
95 ${FILES_TO_MOC}
96)
97
98qt4_wrap_ui(
99 PROJECT_UI_SRCS
100 ${UI_FILES}
101)
102
103# ========================================
104# Build a library
105# ========================================
106pacpus_add_library(
107 ${PROJECT_NAME} SHARED
108 ${PROJECT_SRCS}
109 ${PROJECT_MOC_SRCS}
110 ${PROJECT_UI_SRCS}
111)
112
113# ========================================
114# Libraries
115# ========================================
116if(WIN32)
117 set(LIBS
118 # add your specific libraries to link here
119 vcandm32.lib
120 vxlapi.lib
121 )
122endif(WIN32)
123
124if(UNIX)
125 set(LIBS
126 # add your specific libraries to link here
127 pcan
128 )
129endif(UNIX)
130
131# All the platform
132target_link_libraries(
133 ${PROJECT_NAME}
134 ${PACPUS_LIBRARIES}
135 ${QT_LIBRARIES}
136 ${PACPUS_DEPENDENCIES_LIB}
137 ${LIB}
138)
139
140# ========================================
141# Install
142# ========================================
143pacpus_install(${PROJECT_NAME})
144
Note: See TracBrowser for help on using the repository browser.