examples/c/CMakeLists.txt: make sure C examples link only with C libs

Previously, C examples were being linked with the C++ libs.  This
worked, since currently (until ds18b20) all C++ libraries with C
components simply wrapped the C componenets.

Now we make sure that only the C libs are ever linked with the C
examples.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2016-09-13 11:22:00 -06:00 committed by Noel Eck
parent 6ccab10bbf
commit 5088ee99e6

View File

@ -23,7 +23,7 @@ macro(add_custom_example example_bin example_src example_module_list)
set(found_all_modules FALSE)
endif()
if (MODULE_LIST)
list(FIND MODULE_LIST ${module} index)
list(FIND MODULE_LIST ${module}-c index)
if (${index} EQUAL -1)
set(found_all_modules FALSE)
endif()