mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-05-28 09:41:30 +00:00
8310259cc7
- keymap files (c,h) are in src/Keymaps - keymap files are added to the keymap library in src/Keymaps/CMakeLists.txt - keymaps for the build are listed, along with positions, in /keymap_lists.cmake - cmake generates a keymap jump table from the keymap lib and list - tests mostly passing. Keymap structure for testing will be used as the model for the app keymaps.
74 lines
1.6 KiB
CMake
74 lines
1.6 KiB
CMake
message("C compiler: ${CMAKE_C_COMPILER}")
|
|
|
|
configure_file(${ASDF_SRC_DIR}/Arch/asdf_arch_${ARCH}.h ${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.h COPYONLY)
|
|
configure_file(${ASDF_SRC_DIR}/Arch/asdf_arch_${ARCH}.c ${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.c COPYONLY)
|
|
configure_file(${ASDF_SRC_DIR}/asdf_keymap_table.c.in ${CMAKE_CURRENT_BINARY_DIR}/asdf_keymap_table.c)
|
|
configure_file(${ASDF_SRC_DIR}/asdf_keymap_table.h.in ${CMAKE_CURRENT_BINARY_DIR}/asdf_keymap_table.h)
|
|
|
|
list(APPEND C_FLAGS
|
|
-std=c99
|
|
-Wall
|
|
-funsigned-char
|
|
-funsigned-bitfields
|
|
-ffunction-sections
|
|
-fdata-sections
|
|
-fpack-struct
|
|
-fshort-enums
|
|
-O2
|
|
-Wall
|
|
-Wextra
|
|
-Wpointer-arith
|
|
-Wcast-align
|
|
-Wwrite-strings
|
|
-Wswitch-default
|
|
-Wunreachable-code
|
|
-Winit-self
|
|
-Wmissing-field-initializers
|
|
-Wno-unknown-pragmas
|
|
-Wstrict-prototypes
|
|
-Wundef
|
|
-Wold-style-definition
|
|
)
|
|
|
|
list (APPEND SOURCES
|
|
asdf.c
|
|
${CMAKE_CURRENT_BINARY_DIR}/asdf_arch.c
|
|
asdf_buffer.c
|
|
asdf_hook.c
|
|
asdf_keymap_table.c
|
|
asdf_keymaps.c
|
|
asdf_modifiers.c
|
|
asdf_physical.c
|
|
asdf_repeat.c
|
|
asdf_virtual.c
|
|
main.c
|
|
)
|
|
|
|
# create a library for the keymap modules
|
|
add_subdirectory(Keymaps)
|
|
|
|
# add the executable
|
|
if (COMMAND custom_add_executable)
|
|
custom_add_executable(${ASDF_TARGET_NAME}
|
|
${SOURCES}
|
|
)
|
|
else()
|
|
add_executable(${ASDF_TARGET_NAME})
|
|
endif()
|
|
|
|
target_include_directories(${ASDF_EXECUTABLE_TARGET_NAME}
|
|
PRIVATE
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
target_compile_options(${ASDF_EXECUTABLE_TARGET_NAME}
|
|
PRIVATE
|
|
${CFLAGS}
|
|
)
|
|
|
|
target_link_libraries(${ASDF_EXECUTABLE_TARGET_NAME}
|
|
keymaps
|
|
)
|
|
|