Procházet zdrojové kódy

c++ examples: cmake now honors MODULE_LIST

If MODULE_LIST is set, cmake will only create examples that can be built
with avaialble modules. There has been significant change to cmake file.
Comments show you how to add new examples.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Henry Bruce před 9 roky
rodič
revize
01700b0d49
4 změnil soubory, kde provedl 248 přidání a 445 odebrání
  1. 242
    444
      examples/c++/CMakeLists.txt
  2. 0
    0
      examples/c++/joystick12.cxx
  3. 0
    0
      examples/c++/lol.cxx
  4. 6
    1
      src/CMakeLists.txt

+ 242
- 444
examples/c++/CMakeLists.txt Zobrazit soubor

@@ -1,448 +1,246 @@
1
+# Extract module name from non-standard example name
2
+macro(get_module_name example_name module_name)
3
+  string(LENGTH ${example_name} length)
4
+  string(FIND ${example_name} "-" index)
5
+  if (${index} GREATER 1)
6
+    string(SUBSTRING ${example_name} 0 ${index} substr)
7
+    set(${module_name} ${substr})
8
+  elseif (${example_name} MATCHES "^grove")
9
+    set (${module_name} "grove")
10
+  elseif ((${example_name} MATCHES "^mq" AND ${length} EQUAL 3) OR ${example_name} STREQUAL "tp401")
11
+    set (${module_name} "gas")
12
+  else()
13
+    set(${module_name} ${example_name}) 
14
+  endif()
15
+endmacro()
16
+
17
+
18
+# Set source file, include and linker settings for an example
19
+# If example cannot be built, example_bin is cleared
20
+macro(add_custom_example example_bin example_src example_module_list)
21
+  set(found_all_modules TRUE)
22
+  foreach (module ${example_module_list})
23
+    if (NOT EXISTS "${PROJECT_SOURCE_DIR}/src/${module}")
24
+      set(found_all_modules FALSE)
25
+    endif()
26
+    if (MODULE_LIST)
27
+      list(FIND MODULE_LIST ${module} index)
28
+      if (${index} EQUAL -1)
29
+        set(found_all_modules FALSE)      	
30
+      endif()
31
+    endif()
32
+  endforeach()
33
+  if (found_all_modules)
34
+    add_executable (${example_bin} ${example_src})
35
+    target_link_libraries (${example_bin} ${CMAKE_THREAD_LIBS_INIT})  
36
+    foreach (module ${example_module_list})
37
+      set(module_dir "${PROJECT_SOURCE_DIR}/src/${module}")
38
+      include_directories (${module_dir})
39
+      if (${module} STREQUAL "lcd")
40
+      	set(module "i2clcd")
41
+      endif()
42
+      target_link_libraries (${example_bin} ${module})    
43
+    endforeach()
44
+  else()
45
+   MESSAGE(INFO " Ignored ${example_bin}")
46
+   set (example_bin "")
47
+  endif()  	
48
+endmacro()
49
+
50
+
51
+# Add specified example by name
52
+# Note special case for grove based examples
53
+macro(add_example example_name)
54
+  set(example_src "${example_name}.cxx")
55
+  set(example_bin "${example_name}-example")
56
+  get_module_name(${example_name} module_name)
57
+  set(module_dir "${PROJECT_SOURCE_DIR}/src/${module_name}")
58
+  if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${example_src}"
59
+     AND EXISTS ${module_dir}
60
+     AND IS_DIRECTORY ${module_dir})  
61
+    add_custom_example(${example_bin} ${example_src} ${module_name})
62
+    if ((NOT ${example_bin} STREQUAL "") AND (${module_name} STREQUAL "grove"))
63
+      set(grove_module_path "${PROJECT_SOURCE_DIR}/src/${example_name}")
64
+      if (EXISTS ${grove_module_path})
65
+        include_directories(${grove_module_path})
66
+        target_link_libraries (${example_bin} ${example_name})  
67
+      endif()
68
+    endif()
69
+  else()
70
+   MESSAGE(INFO " Ignored ${example_bin}")
71
+  endif()
72
+endmacro()
73
+
74
+
1 75
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/examples)
2 76
 
3
-add_executable (hmc5883l-example hmc5883l.cxx)
4
-add_executable (groveled-example groveled.cxx)
5
-add_executable (groveled-multi-example groveled-multi.cxx)
6
-add_executable (groverelay-example groverelay.cxx)
7
-add_executable (grovelight-example grovelight.cxx)
8
-add_executable (grovetemp-example grovetemp.cxx)
9
-add_executable (grovebutton-example grovebutton.cxx)
10
-add_executable (groverotary-example groverotary.cxx)
11
-add_executable (groveslide-example groveslide.cxx)
12
-add_executable (lcm1602-i2c-example lcm1602-i2c.cxx)
13
-add_executable (lcm1602-parallel-example lcm1602-parallel.cxx)
14
-add_executable (jhd1313m1-lcd-example jhd1313m1-lcd.cxx)
15
-add_executable (buzzer-sound-example buzzer-sound.cxx)
16
-add_executable (my9221-ledbar-example my9221-ledbar.cxx)
17
-add_executable (my9221-updown-example my9221-updown.cxx)
18
-add_executable (nrf24l01-transmitter-example nrf24l01-transmitter.cxx)
19
-add_executable (nrf24l01-receiver-example nrf24l01-receiver.cxx)
20
-add_executable (nrf24l01-broadcast-example nrf24l01-broadcast.cxx)
21
-add_executable (es08a-example es08a.cxx)
22
-add_executable (hcsr04-example hcsr04.cxx)
23
-add_executable (ssd1306-oled-example ssd1306-oled.cxx)
24
-add_executable (ssd1308-oled-example ssd1308-oled.cxx)
25
-add_executable (ssd1327-oled-example ssd1327-oled.cxx)
26
-add_executable (max44000-example max44000.cxx)
27
-add_executable (mma7455-example mma7455.cxx)
28
-add_executable (st7735-example st7735.cxx)
29
-add_executable (max31855-example max31855.cxx)
30
-add_executable (bmpx8x-example bmpx8x.cxx)
31
-add_executable (stepmotor-example stepmotor.cxx)
32
-add_executable (pulsensor-example pulsensor.cxx)
33
-add_executable (mic-example mic.cxx)
34
-add_executable (mpu9150-example mpu9150.cxx)
35
-add_executable (maxds3231m-example maxds3231m.cxx)
36
-add_executable (max31723-example max31723.cxx)
37
-add_executable (max5487-example max5487.cxx)
38
-add_executable (nrf8001-broadcast-example nrf8001-broadcast.cxx)
39
-add_executable (nrf8001-helloworld-example nrf8001-helloworld.cxx)
40
-add_executable (lpd8806-example lpd8806.cxx)
41
-add_executable (mlx90614-example mlx90614.cxx)
42
-add_executable (ecs1030-example ecs1030.cxx)
43
-add_executable (mq2-example mq2.cxx)
44
-add_executable (mq3-example mq3.cxx)
45
-add_executable (mq4-example mq4.cxx)
46
-add_executable (mq5-example mq5.cxx)
47
-add_executable (mq6-example mq6.cxx)
48
-add_executable (mq7-example mq7.cxx)
49
-add_executable (mq8-example mq8.cxx)
50
-add_executable (mq9-example mq9.cxx)
51
-add_executable (tp401-example tp401.cxx)
52
-add_executable (tcs3414cs-example tcs3414cs.cxx)
53
-add_executable (th02-example th02.cxx)
54
-add_executable (ttp223-example ttp223.cxx)
55
-add_executable (lsm303-example lsm303.cxx)
56
-add_executable (joystick12-example joystick12-example.cxx)
57
-add_executable (lol-example lol-example.cxx)
58
-add_executable (tsl2561-example tsl2561.cxx)
59
-add_executable (htu21d-example htu21d.cxx)
60
-add_executable (mpl3115a2-example mpl3115a2.cxx)
61
-add_executable (ldt0028-example ldt0028.cxx)
62
-add_executable (am2315-example am2315.cxx)
63
-add_executable (itg3200-example itg3200.cxx)
64
-add_executable (enc03r-example enc03r.cxx)
65
-add_executable (adc121c021-example adc121c021.cxx)
66
-add_executable (ds1307-example ds1307.cxx)
67
-add_executable (a110x-example a110x.cxx)
68
-add_executable (gp2y0a-example gp2y0a.cxx)
69
-add_executable (grovemoisture-example grovemoisture.cxx)
70
-add_executable (groveehr-example groveehr.cxx)
71
-add_executable (ta12200-example ta12200.cxx)
72
-add_executable (grovelinefinder-example grovelinefinder.cxx)
73
-add_executable (grovevdiv-example grovevdiv.cxx)
74
-add_executable (grovewater-example grovewater.cxx)
75
-add_executable (guvas12d-example guvas12d.cxx)
76
-add_executable (mpr121-example mpr121.cxx)
77
-add_executable (ublox6-example ublox6.cxx)
78
-add_executable (yg1006-example yg1006.cxx)
79
-add_executable (wt5001-example wt5001.cxx)
80
-add_executable (ppd42ns-example ppd42ns.cxx)
81
-add_executable (mq303a-example mq303a.cxx)
82
-add_executable (grovespeaker-example grovespeaker.cxx)
83
-add_executable (rfr359f-example rfr359f.cxx)
84
-add_executable (biss0001-example biss0001.cxx)
85
-add_executable (rotaryencoder-example rotaryencoder.cxx)
86
-add_executable (adxl345-example adxl345.cxx)
87
-add_executable (rpr220-example rpr220.cxx)
88
-add_executable (rpr220-intr-example rpr220-intr.cxx)
89
-add_executable (mma7660-example mma7660.cxx)
90
-add_executable (cjq4435-example cjq4435.cxx)
91
-add_executable (adxl335-example adxl335.cxx)
92
-add_executable (hmtrp-example hmtrp.cxx)
93
-add_executable (nunchuck-example nunchuck.cxx)
94
-add_executable (otp538u-example otp538u.cxx)
95
-add_executable (grovecollision-example grovecollision.cxx)
96
-add_executable (groveelectromagnet-example groveelectromagnet.cxx)
97
-add_executable (groveemg-example groveemg.cxx)
98
-add_executable (groveo2-example groveo2.cxx)
99
-add_executable (grovegsr-example grovegsr.cxx)
100
-add_executable (ina132-example ina132.cxx)
101
-add_executable (l298-example l298.cxx)
102
-add_executable (l298-stepper-example l298-stepper.cxx)
103
-add_executable (at42qt1070-example at42qt1070.cxx)
104
-add_executable (grovemd-example grovemd.cxx)
105
-add_executable (grovemd-stepper-example grovemd-stepper.cxx)
106
-add_executable (pca9685-example pca9685.cxx)
107
-add_executable (groveeldriver-example groveeldriver.cxx)
108
-add_executable (adafruitss-example adafruitss.cxx)
109
-add_executable (adafruitms1438-example adafruitms1438.cxx)
110
-add_executable (adafruitms1438-stepper-example adafruitms1438-stepper.cxx)
111
-add_executable (hx711-example hx711.cxx)
112
-add_executable (flex-example flex.cxx)
113
-add_executable (a110x-intr-example a110x-intr.cxx)
114
-add_executable (mhz16-example mhz16.cxx)
115
-add_executable (apds9002-example apds9002.cxx)
116
-add_executable (waterlevel-example waterlevel.cxx)
117
-add_executable (tm1637-example tm1637.cxx)
118
-add_executable (zfm20-example zfm20.cxx)
119
-add_executable (zfm20-register-example zfm20-register.cxx)
120
-add_executable (uln200xa-example uln200xa.cxx)
121
-add_executable (grovewfs-example grovewfs.cxx)
122
-add_executable (isd1820-example isd1820.cxx)
123
-add_executable (sx6119-example sx6119.cxx)
124
-add_executable (si114x-example si114x.cxx)
125
-add_executable (maxsonarez-example maxsonarez.cxx)
126
-add_executable (hm11-example hm11.cxx)
127
-add_executable (ht9170-example ht9170.cxx)
128
-add_executable (h3lis331dl-example h3lis331dl.cxx)
129
-add_executable (ad8232-example ad8232.cxx)
130
-add_executable (grovescam-example grovescam.cxx)
131
-add_executable (m24lr64e-example m24lr64e.cxx)
132
-add_executable (grovecircularled-example grovecircularled.cxx)
133
-add_executable (rgbringcoder-example rgbringcoder.cxx)
134
-add_executable (hp20x-example hp20x.cxx)
135
-add_executable (pn532-example pn532.cxx)
136
-add_executable (pn532-writeurl-example pn532-writeurl.cxx)
137
-add_executable (sainsmartks-example sainsmartks.cxx)
138
-add_executable (mpu60x0-example mpu60x0.cxx)
139
-add_executable (ak8975-example ak8975.cxx)
140
-add_executable (lsm9ds0-example lsm9ds0.cxx)
141
-add_executable (eboled-example eboled.cxx)
142
-add_executable (mpu9250-example mpu9250.cxx)
143
-add_executable (loudness-example loudness.cxx)
144
-add_executable (mg811-example mg811.cxx)
145
-add_executable (wheelencoder-example wheelencoder.cxx)
146
-add_executable (sm130-example sm130.cxx)
147
-add_executable (grovegprs-example grovegprs.cxx)
148
-add_executable (lm35-example lm35.cxx)
149
-add_executable (micsv89-example micsv89.cxx)
150
-add_executable (xbee-example xbee.cxx)
151
-add_executable (urm37-example urm37.cxx)
152
-add_executable (urm37-uart-example urm37-uart.cxx)
153
-add_executable (adxrs610-example adxrs610.cxx)
154
-add_executable (bma220-example bma220.cxx)
155
-add_executable (dfrph-example dfrph.cxx)
156
-add_executable (mcp9808-example mcp9808.cxx)
157
-add_executable (groveultrasonic-example groveultrasonic.cxx)
158
-add_executable (sx1276-lora-example sx1276-lora.cxx)
159
-add_executable (sx1276-fsk-example sx1276-fsk.cxx)
160
-# availability of libopenzwave is tested in src/ozw/CMakeLists.txt
161
-if (OPENZWAVE_FOUND)
162
-  add_executable (ozw-example ozw.cxx)
163
-endif ()
77
+# If your sample source file matches the name of the module it tests, add it here
78
+# Exceptions are as follows:
79
+#  string after first '-' is ignored (e.g. nrf24l01-transmitter maps to nrf24l01)
80
+#  mq? will use module gas
81
+#  grove* will use module grove
82
+add_example (hmc5883l)
83
+add_example (groveled)
84
+add_example (groverelay)
85
+add_example (grovelight)
86
+add_example (grovetemp)
87
+add_example (grovebutton)
88
+add_example (groverotary)
89
+add_example (groveslide)
90
+add_example (buzzer-sound)
91
+add_example (my9221-ledbar)
92
+add_example (my9221-updown)
93
+add_example (nrf24l01-transmitter)
94
+add_example (nrf24l01-receiver)
95
+add_example (nrf24l01-broadcast)
96
+add_example (hcsr04)
97
+add_example (max44000)
98
+add_example (mma7455)
99
+add_example (st7735)
100
+add_example (max31855)
101
+add_example (bmpx8x)
102
+add_example (stepmotor)
103
+add_example (pulsensor)
104
+add_example (mic)
105
+add_example (mpu9150)
106
+add_example (maxds3231m)
107
+add_example (max31723)
108
+add_example (max5487)
109
+add_example (nrf8001-broadcast)
110
+add_example (nrf8001-helloworld)
111
+add_example (lpd8806)
112
+add_example (mlx90614)
113
+add_example (ecs1030)
114
+add_example (mq2)
115
+add_example (mq3)
116
+add_example (mq4)
117
+add_example (mq5)
118
+add_example (mq6)
119
+add_example (mq7)
120
+add_example (mq8)
121
+add_example (mq9)
122
+add_example (tp401)
123
+add_example (tcs3414cs)
124
+add_example (th02)
125
+add_example (ttp223)
126
+add_example (lsm303)
127
+add_example (joystick12)
128
+add_example (lol)
129
+add_example (tsl2561)
130
+add_example (htu21d)
131
+add_example (mpl3115a2)
132
+add_example (ldt0028)
133
+add_example (am2315)
134
+add_example (itg3200)
135
+add_example (enc03r)
136
+add_example (adc121c021)
137
+add_example (ds1307)
138
+add_example (a110x)
139
+add_example (gp2y0a)
140
+add_example (grovemoisture)
141
+add_example (groveehr)
142
+add_example (ta12200)
143
+add_example (grovelinefinder)
144
+add_example (grovevdiv)
145
+add_example (grovewater)
146
+add_example (guvas12d)
147
+add_example (mpr121)
148
+add_example (ublox6)
149
+add_example (yg1006)
150
+add_example (wt5001)
151
+add_example (ppd42ns)
152
+add_example (mq303a)
153
+add_example (grovespeaker)
154
+add_example (rfr359f)
155
+add_example (biss0001)
156
+add_example (rotaryencoder)
157
+add_example (adxl345)
158
+add_example (rpr220)
159
+add_example (rpr220-intr)
160
+add_example (mma7660)
161
+add_example (cjq4435)
162
+add_example (adxl335)
163
+add_example (hmtrp)
164
+add_example (nunchuck)
165
+add_example (otp538u)
166
+add_example (grovecollision)
167
+add_example (groveelectromagnet)
168
+add_example (groveemg)
169
+add_example (groveo2)
170
+add_example (grovegsr)
171
+add_example (ina132)
172
+add_example (l298)
173
+add_example (l298-stepper)
174
+add_example (at42qt1070)
175
+add_example (grovemd)
176
+add_example (grovemd-stepper)
177
+add_example (pca9685)
178
+add_example (groveeldriver)
179
+add_example (adafruitss)
180
+add_example (adafruitms1438)
181
+add_example (adafruitms1438-stepper)
182
+add_example (hx711)
183
+add_example (flex)
184
+add_example (a110x-intr)
185
+add_example (mhz16)
186
+add_example (apds9002)
187
+add_example (waterlevel)
188
+add_example (tm1637)
189
+add_example (zfm20)
190
+add_example (zfm20-register)
191
+add_example (uln200xa)
192
+add_example (grovewfs)
193
+add_example (isd1820)
194
+add_example (sx6119)
195
+add_example (si114x)
196
+add_example (maxsonarez)
197
+add_example (hm11)
198
+add_example (ht9170)
199
+add_example (h3lis331dl)
200
+add_example (ad8232)
201
+add_example (grovescam)
202
+add_example (m24lr64e)
203
+add_example (grovecircularled)
204
+add_example (rgbringcoder)
205
+add_example (hp20x)
206
+add_example (pn532)
207
+add_example (pn532-writeurl)
208
+add_example (lsm9ds0)
209
+add_example (loudness)
210
+add_example (mg811)
211
+add_example (wheelencoder)
212
+add_example (sm130)
213
+add_example (grovegprs)
214
+add_example (lm35)
215
+add_example (micsv89)
216
+add_example (xbee)
217
+add_example (urm37)
218
+add_example (urm37-uart)
219
+add_example (adxrs610)
220
+add_example (bma220)
221
+add_example (dfrph)
222
+add_example (mcp9808)
164 223
 
165
-include_directories (${PROJECT_SOURCE_DIR}/src/hmc5883l)
166
-include_directories (${PROJECT_SOURCE_DIR}/src/grove)
167
-include_directories (${PROJECT_SOURCE_DIR}/src/lcd)
168
-include_directories (${PROJECT_SOURCE_DIR}/src/buzzer)
169
-include_directories (${PROJECT_SOURCE_DIR}/src/my9221)
170
-include_directories (${PROJECT_SOURCE_DIR}/src/nrf24l01)
171
-include_directories (${PROJECT_SOURCE_DIR}/src/servo)
172
-include_directories (${PROJECT_SOURCE_DIR}/src/hcsr04)
173
-include_directories (${PROJECT_SOURCE_DIR}/src/max44000)
174
-include_directories (${PROJECT_SOURCE_DIR}/src/mma7455)
175
-include_directories (${PROJECT_SOURCE_DIR}/src/st7735)
176
-include_directories (${PROJECT_SOURCE_DIR}/src/max31855)
177
-include_directories (${PROJECT_SOURCE_DIR}/src/bmpx8x)
178
-include_directories (${PROJECT_SOURCE_DIR}/src/stepmotor)
179
-include_directories (${PROJECT_SOURCE_DIR}/src/pulsensor)
180
-include_directories (${PROJECT_SOURCE_DIR}/src/mic)
181
-include_directories (${PROJECT_SOURCE_DIR}/src/mpu9150)
182
-include_directories (${PROJECT_SOURCE_DIR}/src/maxds3231m)
183
-include_directories (${PROJECT_SOURCE_DIR}/src/max31723)
184
-include_directories (${PROJECT_SOURCE_DIR}/src/max5487)
185
-include_directories (${PROJECT_SOURCE_DIR}/src/nrf8001)
186
-include_directories (${PROJECT_SOURCE_DIR}/src/lpd8806)
187
-include_directories (${PROJECT_SOURCE_DIR}/src/mlx90614)
188
-include_directories (${PROJECT_SOURCE_DIR}/src/ecs1030)
189
-include_directories (${PROJECT_SOURCE_DIR}/src/gas)
190
-include_directories (${PROJECT_SOURCE_DIR}/src/tcs3414cs)
191
-include_directories (${PROJECT_SOURCE_DIR}/src/th02)
192
-include_directories (${PROJECT_SOURCE_DIR}/src/ttp223)
193
-include_directories (${PROJECT_SOURCE_DIR}/src/lsm303)
194
-include_directories (${PROJECT_SOURCE_DIR}/src/joystick12)
195
-include_directories (${PROJECT_SOURCE_DIR}/src/lol)
196
-include_directories (${PROJECT_SOURCE_DIR}/src/tsl2561)
197
-include_directories (${PROJECT_SOURCE_DIR}/src/htu21d)
198
-include_directories (${PROJECT_SOURCE_DIR}/src/mpl3115a2)
199
-include_directories (${PROJECT_SOURCE_DIR}/src/ldt0028)
200
-include_directories (${PROJECT_SOURCE_DIR}/src/am2315)
201
-include_directories (${PROJECT_SOURCE_DIR}/src/itg3200)
202
-include_directories (${PROJECT_SOURCE_DIR}/src/enc03r)
203
-include_directories (${PROJECT_SOURCE_DIR}/src/adc121c021)
204
-include_directories (${PROJECT_SOURCE_DIR}/src/ds1307)
205
-include_directories (${PROJECT_SOURCE_DIR}/src/a110x)
206
-include_directories (${PROJECT_SOURCE_DIR}/src/gp2y0a)
207
-include_directories (${PROJECT_SOURCE_DIR}/src/grovemoisture)
208
-include_directories (${PROJECT_SOURCE_DIR}/src/groveehr)
209
-include_directories (${PROJECT_SOURCE_DIR}/src/ta12200)
210
-include_directories (${PROJECT_SOURCE_DIR}/src/grovelinefinder)
211
-include_directories (${PROJECT_SOURCE_DIR}/src/grovevdiv)
212
-include_directories (${PROJECT_SOURCE_DIR}/src/grovewater)
213
-include_directories (${PROJECT_SOURCE_DIR}/src/guvas12d)
214
-include_directories (${PROJECT_SOURCE_DIR}/src/mpr121)
215
-include_directories (${PROJECT_SOURCE_DIR}/src/ublox6)
216
-include_directories (${PROJECT_SOURCE_DIR}/src/yg1006)
217
-include_directories (${PROJECT_SOURCE_DIR}/src/wt5001)
218
-include_directories (${PROJECT_SOURCE_DIR}/src/ppd42ns)
219
-include_directories (${PROJECT_SOURCE_DIR}/src/mq303a)
220
-include_directories (${PROJECT_SOURCE_DIR}/src/grovespeaker)
221
-include_directories (${PROJECT_SOURCE_DIR}/src/rfr359f)
222
-include_directories (${PROJECT_SOURCE_DIR}/src/biss0001)
223
-include_directories (${PROJECT_SOURCE_DIR}/src/rotaryencoder)
224
-include_directories (${PROJECT_SOURCE_DIR}/src/adxl345)
225
-include_directories (${PROJECT_SOURCE_DIR}/src/rpr220)
226
-include_directories (${PROJECT_SOURCE_DIR}/src/mma7660)
227
-include_directories (${PROJECT_SOURCE_DIR}/src/cjq4435)
228
-include_directories (${PROJECT_SOURCE_DIR}/src/adxl335)
229
-include_directories (${PROJECT_SOURCE_DIR}/src/hmtrp)
230
-include_directories (${PROJECT_SOURCE_DIR}/src/nunchuck)
231
-include_directories (${PROJECT_SOURCE_DIR}/src/otp538u)
232
-include_directories (${PROJECT_SOURCE_DIR}/src/grovecollision)
233
-include_directories (${PROJECT_SOURCE_DIR}/src/groveelectromagnet)
234
-include_directories (${PROJECT_SOURCE_DIR}/src/groveemg)
235
-include_directories (${PROJECT_SOURCE_DIR}/src/groveo2)
236
-include_directories (${PROJECT_SOURCE_DIR}/src/grovegsr)
237
-include_directories (${PROJECT_SOURCE_DIR}/src/ina132)
238
-include_directories (${PROJECT_SOURCE_DIR}/src/l298)
239
-include_directories (${PROJECT_SOURCE_DIR}/src/at42qt1070)
240
-include_directories (${PROJECT_SOURCE_DIR}/src/grovemd)
241
-include_directories (${PROJECT_SOURCE_DIR}/src/pca9685)
242
-include_directories (${PROJECT_SOURCE_DIR}/src/groveeldriver)
243
-include_directories (${PROJECT_SOURCE_DIR}/src/adafruitss)
244
-include_directories (${PROJECT_SOURCE_DIR}/src/adafruitms1438)
245
-include_directories (${PROJECT_SOURCE_DIR}/src/hx711)
246
-include_directories (${PROJECT_SOURCE_DIR}/src/flex)
247
-include_directories (${PROJECT_SOURCE_DIR}/src/mhz16)
248
-include_directories (${PROJECT_SOURCE_DIR}/src/apds9002)
249
-include_directories (${PROJECT_SOURCE_DIR}/src/waterlevel)
250
-include_directories (${PROJECT_SOURCE_DIR}/src/tm1637)
251
-include_directories (${PROJECT_SOURCE_DIR}/src/zfm20)
252
-include_directories (${PROJECT_SOURCE_DIR}/src/uln200xa)
253
-include_directories (${PROJECT_SOURCE_DIR}/src/grovewfs)
254
-include_directories (${PROJECT_SOURCE_DIR}/src/isd1820)
255
-include_directories (${PROJECT_SOURCE_DIR}/src/sx6119)
256
-include_directories (${PROJECT_SOURCE_DIR}/src/si114x)
257
-include_directories (${PROJECT_SOURCE_DIR}/src/maxsonarez)
258
-include_directories (${PROJECT_SOURCE_DIR}/src/hm11)
259
-include_directories (${PROJECT_SOURCE_DIR}/src/ht9170)
260
-include_directories (${PROJECT_SOURCE_DIR}/src/h3lis331dl)
261
-include_directories (${PROJECT_SOURCE_DIR}/src/ad8232)
262
-include_directories (${PROJECT_SOURCE_DIR}/src/grovescam)
263
-include_directories (${PROJECT_SOURCE_DIR}/src/m24lr64e)
264
-include_directories (${PROJECT_SOURCE_DIR}/src/grovecircularled)
265
-include_directories (${PROJECT_SOURCE_DIR}/src/rgbringcoder)
266
-include_directories (${PROJECT_SOURCE_DIR}/src/hp20x)
267
-include_directories (${PROJECT_SOURCE_DIR}/src/pn532)
268
-include_directories (${PROJECT_SOURCE_DIR}/src/lsm9ds0)
269
-include_directories (${PROJECT_SOURCE_DIR}/src/loudness)
270
-include_directories (${PROJECT_SOURCE_DIR}/src/mg811)
271
-include_directories (${PROJECT_SOURCE_DIR}/src/wheelencoder)
272
-include_directories (${PROJECT_SOURCE_DIR}/src/sm130)
273
-include_directories (${PROJECT_SOURCE_DIR}/src/grovegprs)
274
-include_directories (${PROJECT_SOURCE_DIR}/src/lm35)
275
-include_directories (${PROJECT_SOURCE_DIR}/src/micsv89)
276
-include_directories (${PROJECT_SOURCE_DIR}/src/xbee)
277
-include_directories (${PROJECT_SOURCE_DIR}/src/urm37)
278
-include_directories (${PROJECT_SOURCE_DIR}/src/adxrs610)
279
-include_directories (${PROJECT_SOURCE_DIR}/src/bma220)
280
-include_directories (${PROJECT_SOURCE_DIR}/src/dfrph)
281
-include_directories (${PROJECT_SOURCE_DIR}/src/mcp9808)
282
-include_directories (${PROJECT_SOURCE_DIR}/src/groveultrasonic)
283
-include_directories (${PROJECT_SOURCE_DIR}/src/sx1276)
284
-if (OPENZWAVE_FOUND)
285
-  include_directories(${PROJECT_SOURCE_DIR}/src/ozw)
286
-  include_directories(${OPENZWAVE_INCLUDE_DIRS})
287
-endif ()
224
+# These are special cases where you specify example binary, source file and module(s)
225
+include_directories (${PROJECT_SOURCE_DIR}/src)
226
+add_custom_example (groveled-multi-example groveled-multi.cxx grove)
227
+add_custom_example (lcm1602-i2c-example lcm1602-i2c.cxx lcd)
228
+add_custom_example (lcm1602-parallel-example lcm1602-parallel.cxx lcd)
229
+add_custom_example (jhd1313m1-lcd-example jhd1313m1-lcd.cxx lcd)
230
+add_custom_example (es08a-example es08a.cxx servo)
231
+add_custom_example (ssd1306-oled-example ssd1306-oled.cxx lcd)
232
+add_custom_example (ssd1308-oled-example ssd1308-oled.cxx lcd)
233
+add_custom_example (ssd1327-oled-example ssd1327-oled.cxx lcd)
234
+add_custom_example (sainsmartks-example sainsmartks.cxx lcd)
235
+add_custom_example (eboled-example eboled.cxx lcd)
236
+add_custom_example (mpu60x0-example mpu60x0.cxx mpu9150)
237
+add_custom_example (ak8975-example ak8975.cxx mpu9150)
238
+add_custom_example (mpu9250-example mpu9250.cxx mpu9150)
239
+add_custom_example (temperature-sensor temperature-sensor.cxx "si7005;bmp180") 
240
+add_custom_example (humidity-sensor-example humidity-sensor.cxx "si7005") 
241
+add_custom_example (pressure-sensor-example pressure-sensor.cxx "bmp180") 
242
+add_custom_example (cO2-sensor-example cO2-sensor.cxx "t6713") 
243
+add_custom_example (adc-example adc-sensor.cxx ads1015) 
244
+add_custom_example (light-sensor-example light-sensor.cxx "si1132;max44009") 
245
+add_custom_example (light-controller-example light-controller.cxx "lp8860;ds1808lc;hlg150h") 
288 246
 
289
-target_link_libraries (hmc5883l-example hmc5883l ${CMAKE_THREAD_LIBS_INIT})
290
-target_link_libraries (groveled-example grove ${CMAKE_THREAD_LIBS_INIT})
291
-target_link_libraries (groveled-multi-example grove ${CMAKE_THREAD_LIBS_INIT})
292
-target_link_libraries (groverelay-example grove ${CMAKE_THREAD_LIBS_INIT})
293
-target_link_libraries (grovelight-example grove ${CMAKE_THREAD_LIBS_INIT})
294
-target_link_libraries (grovetemp-example grove ${CMAKE_THREAD_LIBS_INIT})
295
-target_link_libraries (grovebutton-example grove ${CMAKE_THREAD_LIBS_INIT})
296
-target_link_libraries (groverotary-example grove ${CMAKE_THREAD_LIBS_INIT})
297
-target_link_libraries (groveslide-example grove ${CMAKE_THREAD_LIBS_INIT})
298
-target_link_libraries (lcm1602-i2c-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
299
-target_link_libraries (lcm1602-parallel-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
300
-target_link_libraries (jhd1313m1-lcd-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
301
-target_link_libraries (buzzer-sound-example buzzer ${CMAKE_THREAD_LIBS_INIT})
302
-target_link_libraries (my9221-ledbar-example my9221 ${CMAKE_THREAD_LIBS_INIT})
303
-target_link_libraries (my9221-updown-example my9221 ${CMAKE_THREAD_LIBS_INIT})
304
-target_link_libraries (nrf24l01-transmitter-example nrf24l01 ${CMAKE_THREAD_LIBS_INIT})
305
-target_link_libraries (nrf24l01-receiver-example nrf24l01 ${CMAKE_THREAD_LIBS_INIT})
306
-target_link_libraries (nrf24l01-broadcast-example nrf24l01 ${CMAKE_THREAD_LIBS_INIT})
307
-target_link_libraries (es08a-example servo ${CMAKE_THREAD_LIBS_INIT})
308
-target_link_libraries (hcsr04-example hcsr04 ${CMAKE_THREAD_LIBS_INIT})
309
-target_link_libraries (ssd1306-oled-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
310
-target_link_libraries (ssd1308-oled-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
311
-target_link_libraries (ssd1327-oled-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
312
-target_link_libraries (max44000-example max44000 ${CMAKE_THREAD_LIBS_INIT})
313
-target_link_libraries (mma7455-example mma7455 ${CMAKE_THREAD_LIBS_INIT})
314
-target_link_libraries (st7735-example st7735 ${CMAKE_THREAD_LIBS_INIT})
315
-target_link_libraries (max31855-example max31855 ${CMAKE_THREAD_LIBS_INIT})
316
-target_link_libraries (bmpx8x-example bmpx8x ${CMAKE_THREAD_LIBS_INIT})
317
-target_link_libraries (stepmotor-example stepmotor ${CMAKE_THREAD_LIBS_INIT})
318
-target_link_libraries (pulsensor-example pulsensor ${CMAKE_THREAD_LIBS_INIT})
319
-target_link_libraries (mic-example mic ${CMAKE_THREAD_LIBS_INIT})
320
-target_link_libraries (mpu9150-example mpu9150 ${CMAKE_THREAD_LIBS_INIT})
321
-target_link_libraries (maxds3231m-example maxds3231m ${CMAKE_THREAD_LIBS_INIT})
322
-target_link_libraries (max31723-example max31723 ${CMAKE_THREAD_LIBS_INIT})
323
-target_link_libraries (max5487-example max5487 ${CMAKE_THREAD_LIBS_INIT})
324
-target_link_libraries (nrf8001-broadcast-example nrf8001 ${CMAKE_THREAD_LIBS_INIT})
325
-target_link_libraries (nrf8001-helloworld-example nrf8001 ${CMAKE_THREAD_LIBS_INIT})
326
-target_link_libraries (lpd8806-example lpd8806 ${CMAKE_THREAD_LIBS_INIT})
327
-target_link_libraries (mlx90614-example mlx90614 ${CMAKE_THREAD_LIBS_INIT})
328
-target_link_libraries (ecs1030-example ecs1030 ${CMAKE_THREAD_LIBS_INIT})
329
-target_link_libraries (mq2-example gas ${CMAKE_THREAD_LIBS_INIT})
330
-target_link_libraries (mq3-example gas ${CMAKE_THREAD_LIBS_INIT})
331
-target_link_libraries (mq4-example gas ${CMAKE_THREAD_LIBS_INIT})
332
-target_link_libraries (mq5-example gas ${CMAKE_THREAD_LIBS_INIT})
333
-target_link_libraries (mq6-example gas ${CMAKE_THREAD_LIBS_INIT})
334
-target_link_libraries (mq7-example gas ${CMAKE_THREAD_LIBS_INIT})
335
-target_link_libraries (mq8-example gas ${CMAKE_THREAD_LIBS_INIT})
336
-target_link_libraries (mq9-example gas ${CMAKE_THREAD_LIBS_INIT})
337
-target_link_libraries (tp401-example gas ${CMAKE_THREAD_LIBS_INIT})
338
-target_link_libraries (tcs3414cs-example tcs3414cs ${CMAKE_THREAD_LIBS_INIT})
339
-target_link_libraries (th02-example th02 ${CMAKE_THREAD_LIBS_INIT})
340
-target_link_libraries (ttp223-example ttp223 ${CMAKE_THREAD_LIBS_INIT})
341
-target_link_libraries (lsm303-example lsm303 ${CMAKE_THREAD_LIBS_INIT})
342
-target_link_libraries (joystick12-example joystick12 ${CMAKE_THREAD_LIBS_INIT})
343
-target_link_libraries (lol-example lol ${CMAKE_THREAD_LIBS_INIT})
344
-target_link_libraries (tsl2561-example tsl2561 ${CMAKE_THREAD_LIBS_INIT})
345
-target_link_libraries (htu21d-example htu21d ${CMAKE_THREAD_LIBS_INIT})
346
-target_link_libraries (mpl3115a2-example mpl3115a2 ${CMAKE_THREAD_LIBS_INIT})
347
-target_link_libraries (ldt0028-example ldt0028 ${CMAKE_THREAD_LIBS_INIT})
348
-target_link_libraries (am2315-example am2315 ${CMAKE_THREAD_LIBS_INIT})
349
-target_link_libraries (itg3200-example itg3200 ${CMAKE_THREAD_LIBS_INIT})
350
-target_link_libraries (enc03r-example enc03r ${CMAKE_THREAD_LIBS_INIT})
351
-target_link_libraries (adc121c021-example adc121c021 ${CMAKE_THREAD_LIBS_INIT})
352
-target_link_libraries (ds1307-example ds1307 ${CMAKE_THREAD_LIBS_INIT})
353
-target_link_libraries (a110x-example a110x ${CMAKE_THREAD_LIBS_INIT})
354
-target_link_libraries (gp2y0a-example gp2y0a ${CMAKE_THREAD_LIBS_INIT})
355
-target_link_libraries (grovemoisture-example grovemoisture ${CMAKE_THREAD_LIBS_INIT})
356
-target_link_libraries (groveehr-example groveehr ${CMAKE_THREAD_LIBS_INIT})
357
-target_link_libraries (ta12200-example ta12200 ${CMAKE_THREAD_LIBS_INIT})
358
-target_link_libraries (grovelinefinder-example grovelinefinder ${CMAKE_THREAD_LIBS_INIT})
359
-target_link_libraries (grovevdiv-example grovevdiv ${CMAKE_THREAD_LIBS_INIT})
360
-target_link_libraries (grovewater-example grovewater ${CMAKE_THREAD_LIBS_INIT})
361
-target_link_libraries (guvas12d-example guvas12d ${CMAKE_THREAD_LIBS_INIT})
362
-target_link_libraries (mpr121-example mpr121 ${CMAKE_THREAD_LIBS_INIT})
363
-target_link_libraries (ublox6-example ublox6 ${CMAKE_THREAD_LIBS_INIT})
364
-target_link_libraries (yg1006-example yg1006 ${CMAKE_THREAD_LIBS_INIT})
365
-target_link_libraries (wt5001-example wt5001 ${CMAKE_THREAD_LIBS_INIT})
366
-target_link_libraries (ppd42ns-example ppd42ns ${CMAKE_THREAD_LIBS_INIT})
367
-target_link_libraries (mq303a-example mq303a ${CMAKE_THREAD_LIBS_INIT})
368
-target_link_libraries (grovespeaker-example grovespeaker ${CMAKE_THREAD_LIBS_INIT})
369
-target_link_libraries (rfr359f-example rfr359f ${CMAKE_THREAD_LIBS_INIT})
370
-target_link_libraries (biss0001-example biss0001 ${CMAKE_THREAD_LIBS_INIT})
371
-target_link_libraries (rotaryencoder-example rotaryencoder ${CMAKE_THREAD_LIBS_INIT})
372
-target_link_libraries (adxl345-example adxl345 ${CMAKE_THREAD_LIBS_INIT})
373
-target_link_libraries (rpr220-example rpr220 ${CMAKE_THREAD_LIBS_INIT})
374
-target_link_libraries (rpr220-intr-example rpr220 ${CMAKE_THREAD_LIBS_INIT})
375
-target_link_libraries (mma7660-example mma7660 ${CMAKE_THREAD_LIBS_INIT})
376
-target_link_libraries (cjq4435-example cjq4435 ${CMAKE_THREAD_LIBS_INIT})
377
-target_link_libraries (adxl335-example adxl335 ${CMAKE_THREAD_LIBS_INIT})
378
-target_link_libraries (hmtrp-example hmtrp ${CMAKE_THREAD_LIBS_INIT})
379
-target_link_libraries (nunchuck-example nunchuck ${CMAKE_THREAD_LIBS_INIT})
380
-target_link_libraries (otp538u-example otp538u ${CMAKE_THREAD_LIBS_INIT})
381
-target_link_libraries (grovecollision-example grovecollision ${CMAKE_THREAD_LIBS_INIT})
382
-target_link_libraries (groveelectromagnet-example groveelectromagnet ${CMAKE_THREAD_LIBS_INIT})
383
-target_link_libraries (groveemg-example groveemg ${CMAKE_THREAD_LIBS_INIT})
384
-target_link_libraries (groveo2-example groveo2 ${CMAKE_THREAD_LIBS_INIT})
385
-target_link_libraries (grovegsr-example grovegsr ${CMAKE_THREAD_LIBS_INIT})
386
-target_link_libraries (ina132-example ina132 ${CMAKE_THREAD_LIBS_INIT})
387
-target_link_libraries (l298-example l298 ${CMAKE_THREAD_LIBS_INIT})
388
-target_link_libraries (l298-stepper-example l298 ${CMAKE_THREAD_LIBS_INIT})
389
-target_link_libraries (at42qt1070-example at42qt1070 ${CMAKE_THREAD_LIBS_INIT})
390
-target_link_libraries (grovemd-example grovemd ${CMAKE_THREAD_LIBS_INIT})
391
-target_link_libraries (grovemd-stepper-example grovemd ${CMAKE_THREAD_LIBS_INIT})
392
-target_link_libraries (pca9685-example pca9685 ${CMAKE_THREAD_LIBS_INIT})
393
-target_link_libraries (groveeldriver-example groveeldriver ${CMAKE_THREAD_LIBS_INIT})
394
-target_link_libraries (adafruitss-example adafruitss ${CMAKE_THREAD_LIBS_INIT})
395
-target_link_libraries (adafruitms1438-example adafruitms1438 ${CMAKE_THREAD_LIBS_INIT})
396
-target_link_libraries (adafruitms1438-stepper-example adafruitms1438 ${CMAKE_THREAD_LIBS_INIT})
397
-target_link_libraries (hx711-example hx711 ${CMAKE_THREAD_LIBS_INIT})
398
-target_link_libraries (flex-example flex ${CMAKE_THREAD_LIBS_INIT})
399
-target_link_libraries (a110x-intr-example a110x ${CMAKE_THREAD_LIBS_INIT})
400
-target_link_libraries (mhz16-example mhz16 ${CMAKE_THREAD_LIBS_INIT})
401
-target_link_libraries (apds9002-example apds9002 ${CMAKE_THREAD_LIBS_INIT})
402
-target_link_libraries (waterlevel-example waterlevel ${CMAKE_THREAD_LIBS_INIT})
403
-target_link_libraries (tm1637-example tm1637 ${CMAKE_THREAD_LIBS_INIT})
404
-target_link_libraries (zfm20-example zfm20 ${CMAKE_THREAD_LIBS_INIT})
405
-target_link_libraries (zfm20-register-example zfm20 ${CMAKE_THREAD_LIBS_INIT})
406
-target_link_libraries (uln200xa-example uln200xa ${CMAKE_THREAD_LIBS_INIT})
407
-target_link_libraries (grovewfs-example grovewfs ${CMAKE_THREAD_LIBS_INIT})
408
-target_link_libraries (isd1820-example isd1820 ${CMAKE_THREAD_LIBS_INIT})
409
-target_link_libraries (sx6119-example sx6119 ${CMAKE_THREAD_LIBS_INIT})
410
-target_link_libraries (si114x-example si114x ${CMAKE_THREAD_LIBS_INIT})
411
-target_link_libraries (maxsonarez-example maxsonarez ${CMAKE_THREAD_LIBS_INIT})
412
-target_link_libraries (hm11-example hm11 ${CMAKE_THREAD_LIBS_INIT})
413
-target_link_libraries (ht9170-example ht9170 ${CMAKE_THREAD_LIBS_INIT})
414
-target_link_libraries (h3lis331dl-example h3lis331dl ${CMAKE_THREAD_LIBS_INIT})
415
-target_link_libraries (ad8232-example ad8232 ${CMAKE_THREAD_LIBS_INIT})
416
-target_link_libraries (grovescam-example grovescam ${CMAKE_THREAD_LIBS_INIT})
417
-target_link_libraries (m24lr64e-example m24lr64e ${CMAKE_THREAD_LIBS_INIT})
418
-target_link_libraries (grovecircularled-example grovecircularled ${CMAKE_THREAD_LIBS_INIT})
419
-target_link_libraries (rgbringcoder-example rgbringcoder ${CMAKE_THREAD_LIBS_INIT})
420
-target_link_libraries (hp20x-example hp20x ${CMAKE_THREAD_LIBS_INIT})
421
-target_link_libraries (pn532-example pn532 ${CMAKE_THREAD_LIBS_INIT})
422
-target_link_libraries (pn532-writeurl-example pn532 ${CMAKE_THREAD_LIBS_INIT})
423
-target_link_libraries (sainsmartks-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
424
-target_link_libraries (mpu60x0-example mpu9150 ${CMAKE_THREAD_LIBS_INIT})
425
-target_link_libraries (ak8975-example mpu9150 ${CMAKE_THREAD_LIBS_INIT})
426
-target_link_libraries (lsm9ds0-example lsm9ds0 ${CMAKE_THREAD_LIBS_INIT})
427
-target_link_libraries (eboled-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
428
-target_link_libraries (mpu9250-example mpu9150 ${CMAKE_THREAD_LIBS_INIT})
429
-target_link_libraries (loudness-example loudness ${CMAKE_THREAD_LIBS_INIT})
430
-target_link_libraries (mg811-example mg811 ${CMAKE_THREAD_LIBS_INIT})
431
-target_link_libraries (wheelencoder-example wheelencoder ${CMAKE_THREAD_LIBS_INIT})
432
-target_link_libraries (sm130-example sm130 ${CMAKE_THREAD_LIBS_INIT})
433
-target_link_libraries (grovegprs-example grovegprs ${CMAKE_THREAD_LIBS_INIT})
434
-target_link_libraries (lm35-example lm35 ${CMAKE_THREAD_LIBS_INIT})
435
-target_link_libraries (micsv89-example micsv89 ${CMAKE_THREAD_LIBS_INIT})
436
-target_link_libraries (xbee-example xbee ${CMAKE_THREAD_LIBS_INIT})
437
-target_link_libraries (urm37-example urm37 ${CMAKE_THREAD_LIBS_INIT})
438
-target_link_libraries (urm37-uart-example urm37 ${CMAKE_THREAD_LIBS_INIT})
439
-target_link_libraries (adxrs610-example adxrs610 ${CMAKE_THREAD_LIBS_INIT})
440
-target_link_libraries (bma220-example bma220 ${CMAKE_THREAD_LIBS_INIT})
441
-target_link_libraries (dfrph-example dfrph ${CMAKE_THREAD_LIBS_INIT})
442
-target_link_libraries (mcp9808-example mcp9808 ${CMAKE_THREAD_LIBS_INIT})
443
-target_link_libraries (groveultrasonic-example groveultrasonic ${CMAKE_THREAD_LIBS_INIT})
444
-target_link_libraries (sx1276-lora-example sx1276 ${CMAKE_THREAD_LIBS_INIT})
445
-target_link_libraries (sx1276-fsk-example sx1276 ${CMAKE_THREAD_LIBS_INIT})
446
-if (OPENZWAVE_FOUND)
447
-  target_link_libraries (ozw-example ozw ${CMAKE_THREAD_LIBS_INIT})
448
-endif ()

examples/c++/joystick12-example.cxx → examples/c++/joystick12.cxx Zobrazit soubor


examples/c++/lol-example.cxx → examples/c++/lol.cxx Zobrazit soubor


+ 6
- 1
src/CMakeLists.txt Zobrazit soubor

@@ -202,7 +202,12 @@ macro(upm_module_init)
202 202
   endif()
203 203
 endmacro(upm_module_init)
204 204
 
205
-subdirlist(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})
205
+if (MODULE_LIST)
206
+  set(SUBDIRS ${MODULE_LIST})
207
+  set(SUBDIRS ${SUBDIRS} upm)
208
+else()
209
+  subdirlist(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})
210
+endif()
206 211
 foreach(subdir ${SUBDIRS})
207 212
     if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt)
208 213
         add_subdirectory(${subdir})