Skip to content

Commit

Permalink
Update Deploy.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
omergoktas authored Nov 19, 2024
1 parent ba06d5a commit d471cc6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cmake/Deploy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,9 @@ function(deploy TARGET)

set(DEPLOY_PREFIX_PATH ${APP_DEPLOY_PREFIX}/${TARGET}.AppDir)

find_program(LINUXDEPLOYQT_EXECUTABLE linuxdeployqt)
find_program(APPIMAGETOOL_EXECUTABLE appimagetool)
find_program(PATCHELF_EXECUTABLE patchelf REQUIRED)

if(NOT LINUXDEPLOYQT_EXECUTABLE)
message(STATUS "Could NOT find linuxdeployqt, downloading...")
set(LINUXDEPLOYQT_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/linuxdeployqt.run)
set(LINUXDEPLOYQT_URL "https://github.com/omergoktas/linuxdeployqt/releases/download/latest/linuxdeployqt-${CMAKE_SYSTEM_PROCESSOR}.AppImage")
file(DOWNLOAD ${LINUXDEPLOYQT_URL} ${LINUXDEPLOYQT_EXECUTABLE} SHOW_PROGRESS)
file(CHMOD ${LINUXDEPLOYQT_EXECUTABLE} PERMISSIONS OWNER_READ OWNER_EXECUTE)
endif()

if(NOT APPIMAGETOOL_EXECUTABLE)
message(STATUS "Could NOT find appimagetool, downloading...")
set(APPIMAGETOOL_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/appimagetool)
Expand Down Expand Up @@ -71,7 +62,7 @@ function(deploy TARGET)
)

add_custom_command(TARGET deploy VERBATIM
COMMAND ARCH=${CMAKE_SYSTEM_PROCESSOR} ${LINUXDEPLOYQT_EXECUTABLE}
COMMAND ARCH=${CMAKE_SYSTEM_PROCESSOR} $<TARGET_FILE:${TARGET}>
${DEPLOY_PREFIX_PATH}/usr/bin/$<TARGET_FILE_NAME:${TARGET}>
-appimage -no-translations -qmake=${QMAKE_EXECUTABLE}
WORKING_DIRECTORY ${APP_DEPLOY_PREFIX}
Expand Down

0 comments on commit d471cc6

Please sign in to comment.