diff options
-rw-r--r-- | utils/cmake/deploy.cmake | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/utils/cmake/deploy.cmake b/utils/cmake/deploy.cmake index 783efdb8e7..34e937f5d5 100644 --- a/utils/cmake/deploy.cmake +++ b/utils/cmake/deploy.cmake | |||
@@ -25,26 +25,28 @@ endif() | |||
25 | 25 | ||
26 | # Linux: Build AppImage | 26 | # Linux: Build AppImage |
27 | if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | 27 | if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
28 | set(LINUXDEPLOY ${CMAKE_BINARY_DIR}/linuxdeploy-x86_64.AppImage) | ||
29 | set(LINUXDEPLOYQT ${CMAKE_BINARY_DIR}/linuxdeploy-plugin-qt-x86_64.AppImage) | ||
30 | add_custom_command( | ||
31 | COMMENT "Downloading linuxdeploy" | ||
32 | OUTPUT ${LINUXDEPLOY} | ||
33 | ${LINUXDEPLOYQT} | ||
34 | COMMAND ${CMAKE_COMMAND} | ||
35 | -DOUTDIR=${CMAKE_BINARY_DIR} | ||
36 | -DURL=https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | ||
37 | -P ${CMAKE_CURRENT_LIST_DIR}/download.cmake | ||
38 | COMMAND ${CMAKE_COMMAND} | ||
39 | -DOUTDIR=${CMAKE_BINARY_DIR} | ||
40 | -DURL=https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | ||
41 | -P ${CMAKE_CURRENT_LIST_DIR}/download.cmake | ||
42 | ) | ||
43 | # intermediate target needed to be able to get back to the actual file dependency. | ||
44 | add_custom_target(linuxdeploy DEPENDS ${LINUXDEPLOY}) | ||
28 | function(deploy_qt target qtbindir iconfile desktopfile dmgbuildcfg) | 45 | function(deploy_qt target qtbindir iconfile desktopfile dmgbuildcfg) |
29 | if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") | 46 | if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") |
30 | message(WARNING "Deploying a Debug build.") | 47 | message(WARNING "Deploying a Debug build.") |
31 | endif() | 48 | endif() |
32 | 49 | ||
33 | set(LINUXDEPLOY ${CMAKE_BINARY_DIR}/linuxdeploy-x86_64.AppImage) | ||
34 | set(LINUXDEPLOYQT ${CMAKE_BINARY_DIR}/linuxdeploy-plugin-qt-x86_64.AppImage) | ||
35 | add_custom_command( | ||
36 | COMMENT "Downloading linuxdeploy" | ||
37 | OUTPUT ${LINUXDEPLOY} | ||
38 | OUTPUT ${LINUXDEPLOYQT} | ||
39 | COMMAND ${CMAKE_COMMAND} | ||
40 | -DOUTDIR=${CMAKE_BINARY_DIR} | ||
41 | -DURL=https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | ||
42 | -P ${CMAKE_SOURCE_DIR}/cmake/download.cmake | ||
43 | COMMAND ${CMAKE_COMMAND} | ||
44 | -DOUTDIR=${CMAKE_BINARY_DIR} | ||
45 | -DURL=https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | ||
46 | -P ${CMAKE_SOURCE_DIR}/cmake/download.cmake | ||
47 | ) | ||
48 | add_custom_command( | 50 | add_custom_command( |
49 | OUTPUT ${CMAKE_BINARY_DIR}/${target}.AppImage | 51 | OUTPUT ${CMAKE_BINARY_DIR}/${target}.AppImage |
50 | COMMENT "Creating AppImage ${target}" | 52 | COMMENT "Creating AppImage ${target}" |
@@ -57,8 +59,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | |||
57 | --appdir=AppImage-${target} | 59 | --appdir=AppImage-${target} |
58 | --output=appimage | 60 | --output=appimage |
59 | --verbosity=2 | 61 | --verbosity=2 |
60 | DEPENDS ${target} | 62 | DEPENDS ${target} linuxdeploy |
61 | ${LINUXDEPLOY} | ||
62 | ) | 63 | ) |
63 | add_custom_target(deploy_${target} | 64 | add_custom_target(deploy_${target} |
64 | DEPENDS ${CMAKE_BINARY_DIR}/${target}.AppImage) | 65 | DEPENDS ${CMAKE_BINARY_DIR}/${target}.AppImage) |