mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-08-07 10:20:46 +00:00
09dc9e4c35
Co-authored-by: Kishi <41839133+Kishi85@users.noreply.github.com>
65 lines
2.1 KiB
CMake
65 lines
2.1 KiB
CMake
# load common dependencies
|
|
# this file will also load platform specific dependencies
|
|
|
|
# Resolve OpenSSL before subprojects run their own find_package(OpenSSL) calls.
|
|
# This ensures a user-provided OPENSSL_ROOT_DIR is honored consistently.
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
# boost, this should be before Simple-Web-Server as it also depends on boost
|
|
include(dependencies/Boost_Sunshine)
|
|
|
|
# submodules
|
|
# moonlight common library
|
|
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries built for enet")
|
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
|
|
|
|
# web server
|
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
|
|
|
|
# lizardbyte common helpers
|
|
set(LIZARDBYTE_COMMON_BUILD_TEST_SUPPORT ${BUILD_TESTS}
|
|
CACHE BOOL "Build lizardbyte-common GoogleTest support helpers" FORCE)
|
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/lizardbyte-common")
|
|
|
|
# libdisplaydevice
|
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/libdisplaydevice")
|
|
|
|
if(SUNSHINE_ENABLE_TRAY)
|
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/tray")
|
|
endif()
|
|
|
|
# common dependencies
|
|
include("${CMAKE_MODULE_PATH}/dependencies/nlohmann_json.cmake")
|
|
find_package(PkgConfig REQUIRED)
|
|
find_package(Threads REQUIRED)
|
|
pkg_check_modules(CURL REQUIRED libcurl)
|
|
|
|
# miniupnp
|
|
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
|
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
|
|
|
# ffmpeg pre-compiled binaries
|
|
include("${CMAKE_MODULE_PATH}/dependencies/ffmpeg.cmake")
|
|
|
|
# Opus
|
|
# Homebrew provides opus as a dynamic library only, so disable static linking for Homebrew builds
|
|
if(SUNSHINE_BUILD_HOMEBREW)
|
|
set(OPUS_USE_STATIC OFF CACHE BOOL "Static linking for libopus")
|
|
else()
|
|
set(OPUS_USE_STATIC ON CACHE BOOL "Static linking for libopus")
|
|
endif()
|
|
include("${CMAKE_MODULE_PATH}/dependencies/FindOpus.cmake")
|
|
|
|
# platform specific dependencies
|
|
if(WIN32)
|
|
include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake")
|
|
elseif(UNIX)
|
|
include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake")
|
|
|
|
if(APPLE)
|
|
include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake")
|
|
else()
|
|
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
|
|
endif()
|
|
endif()
|