2021-05-14 17:12:37 +00:00
|
|
|
set(MOD_NAME pimoroni_i2c)
|
|
|
|
string(TOUPPER ${MOD_NAME} MOD_NAME_UPPER)
|
|
|
|
add_library(usermod_${MOD_NAME} INTERFACE)
|
|
|
|
|
|
|
|
target_sources(usermod_${MOD_NAME} INTERFACE
|
2021-05-17 17:09:39 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.c
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.cpp
|
2021-05-14 17:12:37 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../common/pimoroni_i2c.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(usermod_${MOD_NAME} INTERFACE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
|
2021-05-17 17:09:39 +00:00
|
|
|
MODULE_${MOD_NAME_UPPER}_ENABLED=1
|
2021-05-14 17:12:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})
|