Skip to content

Commit 40d2476

Browse files
will-v-pilurch
andauthored
Fix picotool_DIR and pioasm_DIR passing to universal build (#534)
Fixes #531 --------- Co-authored-by: Andrew Scheller <[email protected]>
1 parent 10758c6 commit 40d2476

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

universal/CMakeLists.txt

+12-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ function (add_universal_target TARGET SOURCE)
4848
endif()
4949

5050
add_custom_target(${TARGET} ALL)
51+
if (picotool_DIR)
52+
set(universal_picotool_DIR ${picotool_DIR})
53+
else()
54+
set(universal_picotool_DIR ${picotool_INSTALL_DIR}/picotool)
55+
endif()
56+
if (pioasm_DIR)
57+
set(universal_pioasm_DIR ${pioasm_DIR})
58+
else()
59+
set(universal_pioasm_DIR ${PIOASM_INSTALL_DIR}/pioasm)
60+
endif()
5161

5262
set(DEPS "")
5363
set(BINS "")
@@ -70,8 +80,8 @@ function (add_universal_target TARGET SOURCE)
7080
"-DUNIVERSAL_PROJECT_DIR:FILEPATH=${SOURCE}"
7181
"-DUNIVERSAL_BINARY_DIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${platform}"
7282
"-DSOURCE_TARGET=${SOURCE_TARGET}"
73-
"-Dpicotool_DIR=${picotool_INSTALL_DIR}/picotool"
74-
"-Dpioasm_DIR=${PIOASM_INSTALL_DIR}/pioasm"
83+
"-Dpicotool_DIR=${universal_picotool_DIR}"
84+
"-Dpioasm_DIR=${universal_pioasm_DIR}"
7585
BUILD_ALWAYS 1 # force dependency checking
7686
INSTALL_COMMAND ""
7787
)

0 commit comments

Comments
 (0)