sensor: grove: fix cmake empty library warning
When there is no grove sensor driver enabled, cmake warns that the library has no sources. Fix that by adding a new kconfig to be used by CMake to selectively include the grove directory. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
e4da47ca8f
commit
ab87df9f75
4 changed files with 12 additions and 1 deletions
|
@ -25,7 +25,7 @@ add_subdirectory_ifdef(CONFIG_ENS210 ens210)
|
||||||
add_subdirectory_ifdef(CONFIG_FDC2X1X fdc2x1x)
|
add_subdirectory_ifdef(CONFIG_FDC2X1X fdc2x1x)
|
||||||
add_subdirectory_ifdef(CONFIG_FXAS21002 fxas21002)
|
add_subdirectory_ifdef(CONFIG_FXAS21002 fxas21002)
|
||||||
add_subdirectory_ifdef(CONFIG_FXOS8700 fxos8700)
|
add_subdirectory_ifdef(CONFIG_FXOS8700 fxos8700)
|
||||||
add_subdirectory(grove)
|
add_subdirectory_ifdef(CONFIG_GROVE_SENSORS grove)
|
||||||
add_subdirectory_ifdef(CONFIG_TI_HDC ti_hdc)
|
add_subdirectory_ifdef(CONFIG_TI_HDC ti_hdc)
|
||||||
add_subdirectory_ifdef(CONFIG_TI_HDC20XX ti_hdc20xx)
|
add_subdirectory_ifdef(CONFIG_TI_HDC20XX ti_hdc20xx)
|
||||||
add_subdirectory_ifdef(CONFIG_HMC5883L hmc5883l)
|
add_subdirectory_ifdef(CONFIG_HMC5883L hmc5883l)
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
# Copyright (c) 2015 Intel Corporation
|
# Copyright (c) 2015 Intel Corporation
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config GROVE_SENSORS
|
||||||
|
bool "Seeed Grove sensors support"
|
||||||
|
help
|
||||||
|
Enable Seeed Grove sensors support.
|
||||||
|
|
||||||
|
if GROVE_SENSORS
|
||||||
|
|
||||||
config GROVE_LIGHT_SENSOR
|
config GROVE_LIGHT_SENSOR
|
||||||
bool "Enable the Seeed Grove Light Sensor"
|
bool "Enable the Seeed Grove Light Sensor"
|
||||||
depends on ADC && !MINIMAL_LIBC
|
depends on ADC && !MINIMAL_LIBC
|
||||||
|
@ -16,3 +23,5 @@ config GROVE_TEMPERATURE_SENSOR
|
||||||
help
|
help
|
||||||
Setting this value will enable driver support for the Grove
|
Setting this value will enable driver support for the Grove
|
||||||
Temperature Sensor.
|
Temperature Sensor.
|
||||||
|
|
||||||
|
endif # GROVE_SENSORS
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
CONFIG_ADC=y
|
CONFIG_ADC=y
|
||||||
CONFIG_SENSOR=y
|
CONFIG_SENSOR=y
|
||||||
|
CONFIG_GROVE_SENSORS=y
|
||||||
CONFIG_GROVE_LIGHT_SENSOR=y
|
CONFIG_GROVE_LIGHT_SENSOR=y
|
||||||
CONFIG_NEWLIB_LIBC=y
|
CONFIG_NEWLIB_LIBC=y
|
||||||
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
|
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
CONFIG_ADC=y
|
CONFIG_ADC=y
|
||||||
CONFIG_SENSOR=y
|
CONFIG_SENSOR=y
|
||||||
|
CONFIG_GROVE_SENSORS=y
|
||||||
CONFIG_GROVE_TEMPERATURE_SENSOR=y
|
CONFIG_GROVE_TEMPERATURE_SENSOR=y
|
||||||
CONFIG_NEWLIB_LIBC=y
|
CONFIG_NEWLIB_LIBC=y
|
||||||
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
|
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue