Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
-S . \
-DBUILD_WERROR=ON \
-DCMAKE_BUILD_TYPE=Release \
-DICU_ROOT="$(brew --prefix icu4c@78 2>/dev/null)" \
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3 2>/dev/null)" \
-DOpus_ROOT_DIR="$(brew --prefix opus 2>/dev/null)" \
-DSUNSHINE_PUBLISHER_NAME="${GITHUB_REPOSITORY_OWNER}" \
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ project(Sunshine VERSION 0.0.0
DESCRIPTION "Self-hosted game stream host for Moonlight"
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()

Comment thread
ReenigneArcher marked this conversation as resolved.
set(PROJECT_LICENSE "GPL-3.0-only")

set(PROJECT_FQDN "dev.lizardbyte.app.Sunshine")
Expand Down
7 changes: 0 additions & 7 deletions cmake/targets/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ elseif(UNIX)
endif()
endif()

# todo - is this necessary? ... for anything except linux?
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()

target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS})
target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS})
set_target_properties(sunshine PROPERTIES CXX_STANDARD 23)

# CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files
if(CUDA_INHERIT_COMPILE_OPTIONS)
Expand Down
1 change: 0 additions & 1 deletion packaging/sunshine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def setup_linux_gcc_environment
def base_cmake_args
args = %W[
-DBUILD_WERROR=ON
-DCMAKE_CXX_STANDARD=23
-DCMAKE_INSTALL_PREFIX=#{prefix}
-DGLAD_SKIP_PIP_INSTALL=ON
-DHOMEBREW_ALLOW_FETCHCONTENT=ON
Expand Down
1 change: 1 addition & 0 deletions scripts/macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function run_step_cmake() {
"-DBUILD_TESTS=${build_tests}"
"-DBUILD_WERROR=ON"
"-DCMAKE_BUILD_TYPE=${build_type}"
"-DICU_ROOT=$(brew --prefix icu4c@78 2>/dev/null)"
"-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@3 2>/dev/null)"
"-DOpus_ROOT_DIR=$(brew --prefix opus 2>/dev/null)"
"-DSUNSHINE_ENABLE_TRAY=ON"
Expand Down
9 changes: 7 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ cmake_minimum_required(VERSION 3.13)

project(test_sunshine)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()

include_directories("${CMAKE_SOURCE_DIR}")

enable_testing()
Expand Down Expand Up @@ -151,8 +158,6 @@ endforeach()
# Ensure locale files are synchronized before building the test executable
add_dependencies(${PROJECT_NAME} sync_locale_files)

set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 23)

# Build the list of libraries to link
set(TEST_LINK_LIBRARIES
${SUNSHINE_EXTERNAL_LIBRARIES}
Expand Down
10 changes: 7 additions & 3 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.20)

project(sunshine_tools)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()

include_directories(
"${CMAKE_SOURCE_DIR}"
"${FFMPEG_INCLUDE_DIRS}" # this is included only for logging
Expand All @@ -13,7 +20,6 @@ set(TOOL_SOURCES
)

add_executable(dxgi-info dxgi.cpp ${TOOL_SOURCES})
set_target_properties(dxgi-info PROPERTIES CXX_STANDARD 23)
target_link_libraries(dxgi-info
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
Expand All @@ -25,7 +31,6 @@ target_link_libraries(dxgi-info
target_compile_options(dxgi-info PRIVATE ${SUNSHINE_COMPILE_OPTIONS})

add_executable(audio-info audio.cpp ${TOOL_SOURCES})
set_target_properties(audio-info PROPERTIES CXX_STANDARD 23)
target_link_libraries(audio-info
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
Expand All @@ -37,7 +42,6 @@ target_link_libraries(audio-info
target_compile_options(audio-info PRIVATE ${SUNSHINE_COMPILE_OPTIONS})

add_executable(sunshinesvc sunshinesvc.cpp)
set_target_properties(sunshinesvc PROPERTIES CXX_STANDARD 23)
target_link_libraries(sunshinesvc
${CMAKE_THREAD_LIBS_INIT}
wtsapi32
Expand Down
Loading