- CPack DEB configuration (cmake/Packaging.cmake): dependencies from dpkg-shlibdeps, udisks2 recommended, strip. - AppStream metadata, installed with the desktop file and the icons; tools/release.sh adds each release to it. - tools/appimage.sh: AppImage of the GTK interface and openpu-cli with linuxdeploy and its GTK plugin (x86_64 and aarch64). - Release workflow: .deb, AppImage and openpu-cli tarball for x86_64 and arm64, attached to the release of a vX.Y.Z tag, or kept as artifacts on a manual run. tools/release.sh edits the release when the workflow created it first. - The GTK interface finds its translations next to the executable (../share/locale), for relocatable installs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
35 lines
1.7 KiB
CMake
35 lines
1.7 KiB
CMake
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-4.0>=4.10)
|
|
include(GNUInstallDirs)
|
|
|
|
add_executable(openpu
|
|
main.cpp
|
|
main_window.cpp
|
|
)
|
|
target_link_libraries(openpu PRIVATE openpu_core PkgConfig::GTKMM openpu_warnings)
|
|
target_compile_definitions(openpu PRIVATE
|
|
GETTEXT_PACKAGE="openpu"
|
|
OPENPU_LOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}"
|
|
OPENPU_BUILD_ICONDIR="${CMAKE_BINARY_DIR}/icons")
|
|
# gtkmm headers trigger -Wshadow/-Wconversion noise we cannot fix.
|
|
target_compile_options(openpu PRIVATE -Wno-shadow -Wno-conversion)
|
|
|
|
install(TARGETS openpu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
install(FILES io.github.openpu.OpenPU.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
|
install(FILES ${PROJECT_SOURCE_DIR}/data/io.github.openpu.OpenPU.metainfo.xml
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
|
|
|
|
# Application icon (data/icons, generated by tools/make_icons.py), installed in the hicolor theme
|
|
# and mirrored in the build tree so that an uninstalled binary finds it too.
|
|
set(OPENPU_ICON io.github.openpu.OpenPU)
|
|
set(OPENPU_ICONS ${PROJECT_SOURCE_DIR}/data/icons)
|
|
configure_file(${OPENPU_ICONS}/openpu.svg ${CMAKE_BINARY_DIR}/icons/hicolor/scalable/apps/${OPENPU_ICON}.svg COPYONLY)
|
|
install(FILES ${OPENPU_ICONS}/openpu.svg
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps RENAME ${OPENPU_ICON}.svg)
|
|
foreach(size 16 24 32 48 64 128 256 512)
|
|
configure_file(${OPENPU_ICONS}/png/openpu-${size}.png
|
|
${CMAKE_BINARY_DIR}/icons/hicolor/${size}x${size}/apps/${OPENPU_ICON}.png COPYONLY)
|
|
install(FILES ${OPENPU_ICONS}/png/openpu-${size}.png
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}x${size}/apps RENAME ${OPENPU_ICON}.png)
|
|
endforeach()
|