Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
19 lines
661 B
Diff
19 lines
661 B
Diff
diff --git a/cmake/targets/linux.cmake b/cmake/targets/linux.cmake
|
|
--- a/cmake/targets/linux.cmake
|
|
+++ b/cmake/targets/linux.cmake
|
|
@@ -1,7 +1,10 @@
|
|
# linux specific target definitions
|
|
|
|
# Using newer c++ compilers / features on older distros causes runtime dyn link errors
|
|
-list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
|
- -static-libgcc
|
|
- -static-libstdc++
|
|
-)
|
|
+list(APPEND SUNSHINE_EXTERNAL_LIBRARIES -static-libgcc)
|
|
+
|
|
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
|
|
+ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES stdc++)
|
|
+else()
|
|
+ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES -static-libstdc++)
|
|
+endif()
|