From 3ba952e61480f0c6e07f90664dcf30e1560ba26f Mon Sep 17 00:00:00 2001 From: Tejas Date: Sat, 25 May 2024 22:06:27 -0700 Subject: [PATCH] don't break c++20 --- cmake/targets/common.cmake | 6 +++--- cmake/targets/windows.cmake | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/targets/common.cmake b/cmake/targets/common.cmake index 718c5209f6b..941ef0b7330 100644 --- a/cmake/targets/common.cmake +++ b/cmake/targets/common.cmake @@ -2,9 +2,6 @@ # this file will also load platform specific macros add_executable(sunshine ${SUNSHINE_TARGET_FILES}) -set_target_properties(sunshine PROPERTIES CXX_STANDARD 17 - VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR}) # platform specific target definitions if(WIN32) @@ -27,6 +24,9 @@ endif() target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS}) target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS}) +set_target_properties(sunshine PROPERTIES CXX_STANDARD 20 + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR}) # CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files if(CUDA_INHERIT_COMPILE_OPTIONS) diff --git a/cmake/targets/windows.cmake b/cmake/targets/windows.cmake index ca8a6963086..b7f8fbcfe7a 100644 --- a/cmake/targets/windows.cmake +++ b/cmake/targets/windows.cmake @@ -1,7 +1,5 @@ # windows specific target definitions -set_target_properties(sunshine PROPERTIES - CXX_STANDARD 20 - LINK_SEARCH_START_STATIC 1) +set_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1) set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") find_library(ZLIB ZLIB1) list(APPEND SUNSHINE_EXTERNAL_LIBRARIES