diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 5174576b..4a6172e5 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -39,18 +39,8 @@ target_sources(app PRIVATE src/events/sensor_event.c) target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c) target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c) target_sources_ifdef(CONFIG_USB app PRIVATE src/events/usb_conn_state_changed.c) +add_subdirectory(src/behaviors) if (NOT CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL) - target_sources(app PRIVATE src/behaviors/behavior_key_press.c) - target_sources(app PRIVATE src/behaviors/behavior_reset.c) - target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c) - target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c) - target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c) - target_sources(app PRIVATE src/behaviors/behavior_outputs.c) - target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c) - target_sources(app PRIVATE src/behaviors/behavior_transparent.c) - target_sources(app PRIVATE src/behaviors/behavior_none.c) - target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c) - target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c) target_sources(app PRIVATE src/keymap.c) endif() target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c) diff --git a/app/src/behaviors/CMakeLists.txt b/app/src/behaviors/CMakeLists.txt new file mode 100644 index 00000000..41588d10 --- /dev/null +++ b/app/src/behaviors/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if (NOT CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL) + target_sources(app PRIVATE behavior_key_press.c) + target_sources(app PRIVATE behavior_reset.c) + target_sources(app PRIVATE behavior_hold_tap.c) + target_sources(app PRIVATE behavior_sticky_key.c) + target_sources(app PRIVATE behavior_momentary_layer.c) + target_sources(app PRIVATE behavior_outputs.c) + target_sources(app PRIVATE behavior_toggle_layer.c) + target_sources(app PRIVATE behavior_transparent.c) + target_sources(app PRIVATE behavior_none.c) + target_sources(app PRIVATE behavior_sensor_rotate_key_press.c) + target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE behavior_ext_power.c) +endif() +target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE behavior_rgb_underglow.c) +target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE behavior_bt.c) \ No newline at end of file