mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Added a CMake option for building as an AppImage and enabled it in the AppImage build scripts.
This commit is contained in:
parent
13fcfdbb03
commit
fb61849d4f
|
@ -34,6 +34,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils
|
||||||
# Define the options.
|
# Define the options.
|
||||||
option(GL "Set to ON if targeting Desktop OpenGL 3.3" ${GL})
|
option(GL "Set to ON if targeting Desktop OpenGL 3.3" ${GL})
|
||||||
option(GLES "Set to ON if targeting OpenGL ES 3.0" ${GLES})
|
option(GLES "Set to ON if targeting OpenGL ES 3.0" ${GLES})
|
||||||
|
option(APPIMAGE_BUILD "Set to ON when building as an AppImage" ${APPIMAGE_BUILD})
|
||||||
option(FLATPAK_BUILD "Set to ON when building as a Flatpak" ${FLATPAK_BUILD})
|
option(FLATPAK_BUILD "Set to ON when building as a Flatpak" ${FLATPAK_BUILD})
|
||||||
option(STEAM_DECK "Set to ON to enable Valve Steam Deck specific build" ${STEAM_DECK})
|
option(STEAM_DECK "Set to ON to enable Valve Steam Deck specific build" ${STEAM_DECK})
|
||||||
option(RPI "Set to ON to enable Raspberry Pi specific build" ${RPI})
|
option(RPI "Set to ON to enable Raspberry Pi specific build" ${RPI})
|
||||||
|
@ -284,8 +285,22 @@ if(GLES)
|
||||||
add_compile_definitions(USE_OPENGLES)
|
add_compile_definitions(USE_OPENGLES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# When building as a Flatpak, all launch commands will be prefixed by "flatpak-spawn --host".
|
if (APPIMAGE_BUILD AND FLATPAK_BUILD)
|
||||||
|
message(FATAL_ERROR "-- APPIMAGE_BUILD and FLATPAK_BUILD can't be combined")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPIMAGE_BUILD)
|
||||||
|
if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||||
|
message(FATAL_ERROR "-- APPIMAGE_BUILD can only be used when building on Linux")
|
||||||
|
endif()
|
||||||
|
add_compile_definitions(APPIMAGE_BUILD)
|
||||||
|
message("-- Building as an AppImage")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(FLATPAK_BUILD)
|
if(FLATPAK_BUILD)
|
||||||
|
if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||||
|
message(FATAL_ERROR "-- FLATPAK_BUILD can only be used when building on Linux")
|
||||||
|
endif()
|
||||||
add_compile_definitions(FLATPAK_BUILD)
|
add_compile_definitions(FLATPAK_BUILD)
|
||||||
message("-- Building as a Flatpak")
|
message("-- Building as a Flatpak")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -38,7 +38,7 @@ rm -rf ./AppDir
|
||||||
mkdir AppDir
|
mkdir AppDir
|
||||||
|
|
||||||
rm -f CMakeCache.txt
|
rm -f CMakeCache.txt
|
||||||
cmake -DBUNDLED_CERTS=on .
|
cmake -DAPPIMAGE_BUILD=on -DBUNDLED_CERTS=on .
|
||||||
make clean
|
make clean
|
||||||
make -j8
|
make -j8
|
||||||
make install DESTDIR=AppDir
|
make install DESTDIR=AppDir
|
||||||
|
|
|
@ -34,7 +34,7 @@ rm -rf ./AppDir
|
||||||
mkdir AppDir
|
mkdir AppDir
|
||||||
|
|
||||||
rm -f CMakeCache.txt
|
rm -f CMakeCache.txt
|
||||||
cmake -DSTEAM_DECK=on .
|
cmake -DAPPIMAGE_BUILD=on -DSTEAM_DECK=on .
|
||||||
make clean
|
make clean
|
||||||
make -j8
|
make -j8
|
||||||
make install DESTDIR=AppDir
|
make install DESTDIR=AppDir
|
||||||
|
|
Loading…
Reference in a new issue