Fix CMake install directives for metadata files

This commit is contained in:
Brenden Davidson 2025-06-28 16:23:44 -05:00
parent 164bb03d32
commit 57812cfad7
No known key found for this signature in database
GPG Key ID: EBED6775E0A324BD
2 changed files with 15 additions and 5 deletions

View File

@ -86,7 +86,9 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ env.BUILD_DIR }}/CMakeCache.txt
key: ${{ matrix.name }}-${{ hashFiles('**/CMakeLists.txt,**/*.cmake') }}
key: ${{ matrix.name }}-${{ hashFiles('**/CMakeLists.txt','**/*.cmake') }}
restore-keys: |
${{ matrix.name }}-
- name: Configure (CMake)
run: |
@ -139,7 +141,9 @@ jobs:
uses: actions/cache@v4
with:
path: .flatpak-builder
key: ${{ matrix.arch }}-${{ hashFiles('packaging/linux/flatpak/isledecomp.manifest.json.in') }}
key: ${{ matrix.arch }}-${{ hashFiles('packaging/linux/flatpak/org.legoisland.Isle.json') }}
restore-keys: |
${{ matrix.arch }}-
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6

View File

@ -1,4 +1,10 @@
if(DEFINED ENV{FLATPAK_DEST})
set(FLATPAK TRUE)
else()
set(FLATPAK FALSE)
endif()
if(FLATPAK)
set(METADATA_ROOT "$ENV{FLATPAK_DEST}/share")
else()
set(METADATA_ROOT "/usr/share")
@ -8,6 +14,6 @@ endif()
configure_file(isledecomp.desktop.in "${APP_ID}.desktop" @ONLY)
configure_file(isledecomp.metainfo.xml.in "${APP_ID}.metainfo.xml" @ONLY)
install(FILES "../icons/isle.svg" RENAME "${APP_ID}.svg" DESTINATION "${METADATA_ROOT}/icons/hicolor/scalable/apps/")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APP_ID}.desktop" DESTINATION "${METADATA_ROOT}/applications/")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APP_ID}.metainfo.xml" DESTINATION "${METADATA_ROOT}/metainfo/")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../icons/isle.svg" RENAME "${APP_ID}.svg" DESTINATION "${METADATA_ROOT}/icons/hicolor/scalable/apps/")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${APP_ID}.desktop" DESTINATION "${METADATA_ROOT}/applications/")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${APP_ID}.metainfo.xml" DESTINATION "${METADATA_ROOT}/metainfo/")