Skip to content

Commit

Permalink
pico: add a BLIT_BOARD_x define for the selected board
Browse files Browse the repository at this point in the history
To hopefully avoid more code relying on internal #defines to guess the board type...

(DISPLAY_ST7789 != PicoSystem)
  • Loading branch information
Daft-Freak committed Jul 13, 2023
1 parent 96ba98a commit d62449d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 32blit-pico/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ if(DEFINED PICO_ADDON)
# for boards that don't have a board in the pico sdk
# (usually because they are an add-on for a regular pico)
set(CONFIG_PATH ${CMAKE_CURRENT_LIST_DIR}/board/${PICO_ADDON})
set(BOARD_ID ${PICO_ADDON})
else()
set(CONFIG_PATH ${CMAKE_CURRENT_LIST_DIR}/board/${PICO_BOARD})
set(BOARD_ID ${PICO_BOARD})
endif()

if(EXISTS ${CONFIG_PATH}/config.cmake)
Expand All @@ -89,6 +91,10 @@ if(EXISTS ${CONFIG_PATH}/config.h)
list(APPEND BLIT_BOARD_DEFINITIONS "BLIT_BOARD_CONFIG=\"${CONFIG_PATH}/config.h\"")
endif()

# board id definition
string(TOUPPER ${BOARD_ID} BOARD_ID)
list(APPEND BLIT_BOARD_DEFINITIONS BLIT_BOARD_${BOARD_ID})

# default drivers
if(NOT BLIT_AUDIO_DRIVER)
set(BLIT_AUDIO_DRIVER "none")
Expand Down

0 comments on commit d62449d

Please sign in to comment.