Skip to content

Commit

Permalink
Fix picotool_DIR and pioasm_DIR passing to universal build (#534)
Browse files Browse the repository at this point in the history
Fixes #531
---------

Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
  • Loading branch information
will-v-pi and lurch authored Sep 5, 2024
1 parent 10758c6 commit 40d2476
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions universal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ function (add_universal_target TARGET SOURCE)
endif()

add_custom_target(${TARGET} ALL)
if (picotool_DIR)
set(universal_picotool_DIR ${picotool_DIR})
else()
set(universal_picotool_DIR ${picotool_INSTALL_DIR}/picotool)
endif()
if (pioasm_DIR)
set(universal_pioasm_DIR ${pioasm_DIR})
else()
set(universal_pioasm_DIR ${PIOASM_INSTALL_DIR}/pioasm)
endif()

set(DEPS "")
set(BINS "")
Expand All @@ -70,8 +80,8 @@ function (add_universal_target TARGET SOURCE)
"-DUNIVERSAL_PROJECT_DIR:FILEPATH=${SOURCE}"
"-DUNIVERSAL_BINARY_DIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${platform}"
"-DSOURCE_TARGET=${SOURCE_TARGET}"
"-Dpicotool_DIR=${picotool_INSTALL_DIR}/picotool"
"-Dpioasm_DIR=${PIOASM_INSTALL_DIR}/pioasm"
"-Dpicotool_DIR=${universal_picotool_DIR}"
"-Dpioasm_DIR=${universal_pioasm_DIR}"
BUILD_ALWAYS 1 # force dependency checking
INSTALL_COMMAND ""
)
Expand Down

0 comments on commit 40d2476

Please sign in to comment.