aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/CMakeLists.txt
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2022-04-24 21:22:20 +0000
committerPete Johanson <[email protected]>2022-05-17 13:09:21 -0400
commit0a40f922b57f094c1b6f2358c517ab243cd3367e (patch)
tree7e0300b2441f88613332004b57123f26236480fb /app/CMakeLists.txt
parent25f89ee6ab68024f5da4474c88bbd93511996d2a (diff)
downloadzmk-0a40f922b57f094c1b6f2358c517ab243cd3367e.tar.gz
zmk-0a40f922b57f094c1b6f2358c517ab243cd3367e.zip
refactor(split): Seperate peripheral BLE handling.
* Move foundational BLE code for split peripherals to a dedicated file to avoid tons of conditionals and awkward code.
Diffstat (limited to 'app/CMakeLists.txt')
-rw-r--r--app/CMakeLists.txt23
1 files changed, 15 insertions, 8 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 1492be16c8..ee6d875929 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -63,27 +63,34 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
target_sources(app PRIVATE src/combo.c)
target_sources(app PRIVATE src/behavior_queue.c)
target_sources(app PRIVATE src/conditional_layer.c)
+ target_sources(app PRIVATE src/endpoints.c)
+ target_sources(app PRIVATE src/hid_listener.c)
target_sources(app PRIVATE src/keymap.c)
+
+ target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/behaviors/behavior_bt.c)
+
+ if (CONFIG_ZMK_BLE)
+ target_sources(app PRIVATE src/ble.c)
+ target_sources(app PRIVATE src/hog.c)
+ endif()
endif()
+
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
-target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/behaviors/behavior_bt.c)
-target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
+
if (CONFIG_ZMK_SPLIT_BLE AND (NOT CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL))
- target_sources(app PRIVATE src/split_listener.c)
- target_sources(app PRIVATE src/split/bluetooth/service.c)
+ target_sources(app PRIVATE src/split_listener.c)
+ target_sources(app PRIVATE src/split/bluetooth/service.c)
+ target_sources(app PRIVATE src/split/bluetooth/peripheral.c)
endif()
if (CONFIG_ZMK_SPLIT_BLE AND CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
- target_sources(app PRIVATE src/split/bluetooth/central.c)
+ target_sources(app PRIVATE src/split/bluetooth/central.c)
endif()
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
-target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/hog.c)
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
-target_sources(app PRIVATE src/endpoints.c)
-target_sources(app PRIVATE src/hid_listener.c)
target_sources(app PRIVATE src/main.c)
add_subdirectory(src/display/)