build(cmake): add prep/init.cmake (#2375)

Co-authored-by: James Le Cuirot <chewi@aura-online.co.uk>
This commit is contained in:
ReenigneArcher 2024-04-05 22:48:13 -04:00 committed by GitHub
parent 1ed22ab3b2
commit 59ce8deb97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 6 deletions

View File

@ -29,6 +29,9 @@ include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
# cmake build flags
include(${CMAKE_MODULE_PATH}/prep/options.cmake)
# initial prep
include(${CMAKE_MODULE_PATH}/prep/init.cmake)
# configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc.
include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake)

View File

@ -8,10 +8,6 @@ if(${SUNSHINE_BUILD_APPIMAGE})
string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR})
endif()
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif()
# cuda
set(CUDA_FOUND OFF)
if(${SUNSHINE_ENABLE_CUDA})

9
cmake/prep/init.cmake Normal file
View File

@ -0,0 +1,9 @@
if (WIN32)
elseif (APPLE)
elseif (UNIX)
include(GNUInstallDirs)
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif()
endif ()

View File

@ -6,8 +6,6 @@ if (APPLE)
configure_file(packaging/macos/sunshine.rb sunshine.rb @ONLY)
endif()
elseif (UNIX)
include(GNUInstallDirs) # this needs to be included prior to configuring the desktop files
# configure the .desktop file
if(${SUNSHINE_BUILD_APPIMAGE})
configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY)