Sunshine/cmake/dependencies/common.cmake
ReenigneArcher d8fbe2d709
Some checks are pending
CI / GitHub Env Debug (push) Waiting to run
CI / Setup Release (push) Waiting to run
CI / Setup Flatpak Matrix (push) Waiting to run
CI / Linux Flatpak (push) Blocked by required conditions
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (13, true) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Blocked by required conditions
CI / Windows (push) Blocked by required conditions
CI Docker / Check Dockerfiles (push) Waiting to run
CI Docker / Setup Release (push) Blocked by required conditions
CI Docker / Docker${{ matrix.tag }} (push) Blocked by required conditions
CodeQL / Get language matrix (push) Waiting to run
CodeQL / Analyze (${{ matrix.name }}) (push) Blocked by required conditions
localize / Update Localization (push) Waiting to run
Build GH-Pages / update_pages (push) Waiting to run
build(deps): update dependency and paths for build-deps submodule (#3341)
2024-10-30 14:06:06 +00:00

82 lines
3.0 KiB
CMake

# load common dependencies
# this file will also load platform specific dependencies
# 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")
# common dependencies
find_package(OpenSSL REQUIRED)
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
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
if(WIN32)
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
elseif(UNIX AND NOT APPLE)
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
endif()
set(FFMPEG_PREPARED_BINARIES
"${CMAKE_SOURCE_DIR}/third-party/build-deps/dist/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
# check if the directory exists
if(NOT EXISTS "${FFMPEG_PREPARED_BINARIES}")
message(FATAL_ERROR
"FFmpeg pre-compiled binaries not found at ${FFMPEG_PREPARED_BINARIES}. \
Please consider contributing to the LizardByte/build-deps repository. \
Optionally, you can use the FFMPEG_PREPARED_BINARIES option to specify the path to the \
system-installed FFmpeg libraries")
endif()
if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
set(HDR10_PLUS_LIBRARY
"${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
endif()
set(FFMPEG_LIBRARIES
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libx264.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libx265.a"
${HDR10_PLUS_LIBRARY}
${FFMPEG_PLATFORM_LIBRARIES})
else()
set(FFMPEG_LIBRARIES
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
${FFMPEG_PLATFORM_LIBRARIES})
endif()
set(FFMPEG_INCLUDE_DIRS
"${FFMPEG_PREPARED_BINARIES}/include")
# 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()