Files
CMake/Tests/RunCMake/RunCPack/AppImageTestApp/CMakeLists.txt
T
Daniel Nicoletti 1a6dbcc9ea CPack: Add AppImage generator
This AppImage generator only relies on appimagetool and patchelf.

Closes: #27104
Co-authored-by: Brad King <brad.king@kitware.com>
2025-09-03 18:50:40 -04:00

31 lines
855 B
CMake

cmake_minimum_required(VERSION 4.0)
project(CPackAppImageGenerator
LANGUAGES CXX
VERSION "1.2.3"
)
add_executable(app main.cpp)
install(TARGETS app
RUNTIME
DESTINATION bin
COMPONENT applications)
install(FILES com.example.app.desktop DESTINATION share/applications)
install(FILES ApplicationIcon.png DESTINATION share/icons/hicolor/64x64/apps)
# Create AppImage package
set(CPACK_GENERATOR AppImage)
set(CPACK_PACKAGE_NAME GeneratorTest)
set(CPACK_PACKAGE_VERSION ${CMAKE_PROJECT_VERSION})
set(CPACK_PACKAGE_VENDOR "ACME Inc")
set(CPACK_PACKAGE_DESCRIPTION "An AppImage package for testing CMake's CPack AppImage generator")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A test AppImage package")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.example.com")
# AppImage generator variables
set(CPACK_PACKAGE_ICON ApplicationIcon.png)
include(CPack)