2022-03-21 17:02:46 +00:00
|
|
|
set(MOD_NAME st7789)
|
|
|
|
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-05-29 14:42:31 +01:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/picographics_st7789/picographics_st7789.cpp
|
2022-03-21 17:02:46 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/st7789/st7789.cpp
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/pico_graphics.cpp
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/types.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(usermod_${MOD_NAME} INTERFACE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
|
|
|
|
-DMODULE_${MOD_NAME_UPPER}_ENABLED=1
|
|
|
|
)
|
|
|
|
|
2022-05-27 16:52:43 +01:00
|
|
|
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})
|
|
|
|
|
|
|
|
set_source_files_properties(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.c
|
|
|
|
PROPERTIES COMPILE_FLAGS
|
|
|
|
"-Wno-discarded-qualifiers"
|
|
|
|
)
|