diff --git a/universal/CMakeLists.txt b/universal/CMakeLists.txt index e17878d4f..f80fbd436 100644 --- a/universal/CMakeLists.txt +++ b/universal/CMakeLists.txt @@ -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 "") @@ -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 "" )