2024-06-12 19:58:25 +00:00
|
|
|
if(UNIX)
|
|
|
|
if(${SUNSHINE_CONFIGURE_HOMEBREW})
|
|
|
|
configure_file(packaging/sunshine.rb sunshine.rb @ONLY)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(APPLE)
|
2023-09-05 00:16:30 +00:00
|
|
|
if(${SUNSHINE_CONFIGURE_PORTFILE})
|
|
|
|
configure_file(packaging/macos/Portfile Portfile @ONLY)
|
|
|
|
endif()
|
2024-06-12 19:58:25 +00:00
|
|
|
elseif(UNIX)
|
2023-09-05 00:16:30 +00:00
|
|
|
# configure the .desktop file
|
2024-07-07 14:19:11 +00:00
|
|
|
set(SUNSHINE_DESKTOP_ICON "sunshine.svg")
|
2023-09-05 00:16:30 +00:00
|
|
|
if(${SUNSHINE_BUILD_APPIMAGE})
|
|
|
|
configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY)
|
|
|
|
elseif(${SUNSHINE_BUILD_FLATPAK})
|
2024-07-07 14:19:11 +00:00
|
|
|
set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}.svg")
|
2023-09-05 00:16:30 +00:00
|
|
|
configure_file(packaging/linux/flatpak/sunshine.desktop sunshine.desktop @ONLY)
|
|
|
|
configure_file(packaging/linux/flatpak/sunshine_kms.desktop sunshine_kms.desktop @ONLY)
|
2023-10-25 18:14:28 +00:00
|
|
|
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
|
2024-07-07 14:19:11 +00:00
|
|
|
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.metainfo.xml
|
|
|
|
${PROJECT_FQDN}.metainfo.xml @ONLY)
|
2023-09-05 00:16:30 +00:00
|
|
|
else()
|
|
|
|
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
|
2023-10-25 18:14:28 +00:00
|
|
|
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
|
2023-09-05 00:16:30 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# configure metadata file
|
|
|
|
configure_file(packaging/linux/sunshine.appdata.xml sunshine.appdata.xml @ONLY)
|
|
|
|
|
|
|
|
# configure service
|
|
|
|
configure_file(packaging/linux/sunshine.service.in sunshine.service @ONLY)
|
|
|
|
|
|
|
|
# configure the arch linux pkgbuild
|
|
|
|
if(${SUNSHINE_CONFIGURE_PKGBUILD})
|
|
|
|
configure_file(packaging/linux/Arch/PKGBUILD PKGBUILD @ONLY)
|
2024-03-09 17:55:22 +00:00
|
|
|
configure_file(packaging/linux/Arch/sunshine.install sunshine.install @ONLY)
|
2023-09-05 00:16:30 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# configure the flatpak manifest
|
|
|
|
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
|
2024-07-07 14:19:11 +00:00
|
|
|
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY)
|
2024-03-24 23:52:24 +00:00
|
|
|
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
|
2024-07-02 22:42:21 +00:00
|
|
|
file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR})
|
2023-09-05 00:16:30 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# return if configure only is set
|
|
|
|
if(${SUNSHINE_CONFIGURE_ONLY})
|
|
|
|
# message
|
|
|
|
message(STATUS "SUNSHINE_CONFIGURE_ONLY: ON, exiting...")
|
|
|
|
set(END_BUILD ON)
|
|
|
|
else()
|
|
|
|
set(END_BUILD OFF)
|
|
|
|
endif()
|