Skip to content

Commit 852d654

Browse files
authored
Merge pull request #73 from choco-technologies/copilot/add-absolute-path-conversion
Convert relative DMBOOT_MANIFEST_URL to absolute path at configure time
2 parents fe036e9 + 9015fa5 commit 852d654

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ set(DMBOOT_EXTRA_SDCARD_DMD_FILES "" CACHE STRING "Additional sdcard.dmd files t
1717
set(DMBOOT_MANIFEST_URL "" CACHE STRING "Manifest path/URL to use with dmf-get -m flag for all module downloads")
1818
option(DMBOOT_EMULATION "Enable Renode emulation mode" OFF)
1919

20+
# Convert relative manifest path to absolute so it remains valid when the
21+
# working directory changes during the build (e.g. dmf-get is invoked from a
22+
# different directory than where cmake was originally run).
23+
if(DMBOOT_MANIFEST_URL AND NOT DMBOOT_MANIFEST_URL MATCHES "://")
24+
get_filename_component(DMBOOT_MANIFEST_URL "${DMBOOT_MANIFEST_URL}" ABSOLUTE BASE_DIR "${CMAKE_BINARY_DIR}")
25+
message(STATUS "Resolved manifest path to absolute: ${DMBOOT_MANIFEST_URL}")
26+
endif()
27+
2028
# ======================================================================
2129
# Early DMOD Configuration (before project())
2230
# ======================================================================

0 commit comments

Comments
 (0)