From 7fc30a82455f2fafdea083c7413460a6e5d4e081 Mon Sep 17 00:00:00 2001
From: Andrew Udvare <audvare@gmail.com>
Date: Mon, 11 May 2026 23:36:01 -0400
Subject: [PATCH 01/20] Allow shared system Boost; only force static for
 bundled distribution

VITA3K_FORCE_SYSTEM_BOOST=ON previously hard-coded Boost_USE_STATIC_LIBS=ON in
the system-boost branch, which fails on Linux distributions that ship Boost as
shared libraries only (the most common case).

Drop the force in the system-boost path. The bundled-boost path keeps it
because the bundled distribution is intentionally built as a static archive.
Users who want static system Boost can pass -DBoost_USE_STATIC_LIBS=ON on the
cmake command line.

Signed-off-by: Andrew Udvare <audvare@gmail.com>
---
 CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1336cea..a19253f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -257,8 +257,10 @@ macro(get_boost)
 			endif()
 		endif()
 	else()
-		# Try to find Boost on the system and CMake's default paths
-		set(Boost_USE_STATIC_LIBS ON)
+		# Try to find Boost on the system and CMake's default paths.
+		# Do not force Boost_USE_STATIC_LIBS: most Linux distributions ship
+		# shared-only Boost. Users who want static system Boost can pass
+		# -DBoost_USE_STATIC_LIBS=ON on the cmake command line.
 		find_package(Boost 1.81 COMPONENTS ${BOOST_MODULES_TO_FIND} REQUIRED)
 	endif()
 endmacro(get_boost)
-- 
2.54.0

