2022-04-13 20:13:27 +01:00
|
|
|
set(MOD_NAME encoder)
|
|
|
|
string(TOUPPER ${MOD_NAME} MOD_NAME_UPPER)
|
|
|
|
add_library(usermod_${MOD_NAME} INTERFACE)
|
|
|
|
|
|
|
|
target_sources(usermod_${MOD_NAME} INTERFACE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.c
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.cpp
|
2022-04-22 16:23:45 +01:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder/encoder.cpp
|
2022-04-13 20:13:27 +01:00
|
|
|
)
|
2022-04-22 16:23:45 +01:00
|
|
|
pico_generate_pio_header(usermod_${MOD_NAME} ${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder/encoder.pio)
|
2022-04-13 20:13:27 +01:00
|
|
|
|
|
|
|
target_include_directories(usermod_${MOD_NAME} INTERFACE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
2022-04-22 16:23:45 +01:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder/
|
2022-04-13 20:13:27 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
|
|
|
|
MODULE_ENCODER_ENABLED=1
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})
|