Skip to content

Commit 77256c1

Browse files
committed
Use system enviroment var ARCH to decide which appimagetool bin should be downloaded
1 parent a417914 commit 77256c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/data/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ message(STATUS "Generating test data AppImage")
33
# Get appimagetool
44
set(APPIMAGETOOL_BIN ${CMAKE_CURRENT_BINARY_DIR}/appimagetool)
55
if(NOT EXISTS ${APPIMAGETOOL_BIN})
6-
message(STATUS "Downloading appimagetool for ${CMAKE_SYSTEM_PROCESSOR}")
7-
file(DOWNLOAD "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${CMAKE_SYSTEM_PROCESSOR}.AppImage" "${APPIMAGETOOL_BIN}" SHOW_PROGRESS)
6+
if($ENV{ARCH})
7+
set(APPIMAGETOOL_BIN_ARCH $ENV{ARCH})
8+
else()
9+
set(APPIMAGETOOL_BIN_ARCH ${CMAKE_SYSTEM_PROCESSOR})
10+
endif()
11+
12+
message(STATUS "Downloading appimagetool for ${APPIMAGETOOL_BIN_ARCH}")
13+
file(DOWNLOAD "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${APPIMAGETOOL_BIN_ARCH}.AppImage" "${APPIMAGETOOL_BIN}")
14+
815
execute_process(COMMAND chmod +x ${APPIMAGETOOL_BIN})
916
endif()
1017
message(STATUS "Using appimagetool: ${APPIMAGETOOL_BIN}")

0 commit comments

Comments
 (0)