mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-29 21:38:47 +02:00
basic json validator supporting most used properties. converted some regex to cmake-compatible expressions
This commit is contained in:
@@ -2,12 +2,12 @@ option(BACKLIGHT_ENABLE "" TRUE)
|
||||
set(BACKLIGHT_DRIVER "pwm" CACHE STRING "Backlight driver")
|
||||
set_property(CACHE BACKLIGHT_DRIVER PROPERTY STRINGS pwm timer software custom)
|
||||
|
||||
if(${BACKLIGHT_ENABLE})
|
||||
string(JSON BACKLIGHT_PIN ERROR_VARIABLE NO_BACKLIGHT_PIN GET ${QMK_KEYBOARD_INFO_JSON_STRING} backlight pin)
|
||||
if(${BACKLIGHT_ENABLE} AND NOT ${NO_BACKLIGHT_PIN} STREQUAL "backlight-NOTFOUND")
|
||||
add_library(backlight
|
||||
quantum/backlight/backlight.c
|
||||
quantum/process_keycode/process_backlight.c
|
||||
)
|
||||
string(JSON BACKLIGHT_PIN GET ${QMK_KEYBOARD_INFO_JSON_STRING} backlight pin)
|
||||
add_compile_definitions(
|
||||
BACKLIGHT_ENABLE
|
||||
BACKLIGHT_PIN=${BACKLIGHT_PIN}
|
||||
|
||||
Reference in New Issue
Block a user