Skip to content

Commit b56e92c

Browse files
feat: add boost
1 parent e0d5524 commit b56e92c

5 files changed

Lines changed: 47 additions & 7 deletions

File tree

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[submodule "third-party/boost"]
2+
path = third-party/boost
3+
url = https://github.com/boostorg/boost.git
4+
branch = master
15
[submodule "third-party/FFmpeg/AMF"]
26
path = third-party/FFmpeg/AMF
37
url = https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ cmake_minimum_required(VERSION 3.25)
33
project(build-deps
44
DESCRIPTION "Pre-built dependencies for LizardByte projects."
55
VERSION 0.0.0
6+
LANGUAGES C CXX
67
)
78

89
# Main options
910
option(BUILD_ALL "Build all dependencies" ON)
11+
option(BUILD_ALL_LIBDISPLAYDEVICE "Build all libdisplaydevice dependencies" ON)
1012
option(BUILD_ALL_SUNSHINE "Build all Sunshine dependencies" ON)
1113

14+
# Boost options
15+
option(BUILD_BOOST "Build Boost" ON)
16+
1217
# FFmpeg options
1318
option(BUILD_FFMPEG "Build FFmpeg" ON)
1419
option(BUILD_FFMPEG_ALL_PATCHES "Apply FFmpeg patches" ON)
@@ -200,6 +205,12 @@ message(STATUS "Detected system name: ${CMAKE_SYSTEM_NAME}")
200205
message(STATUS "Detected architecture: ${CMAKE_SYSTEM_PROCESSOR}")
201206
message(STATUS "CI Matrix name should be: '${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}'")
202207

208+
# boost
209+
if(BUILD_ALL OR BUILD_ALL_LIBDISPLAYDEVICE OR BUILD_ALL_SUNSHINE OR BUILD_BOOST)
210+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/boost/_main.cmake)
211+
endif()
212+
213+
# FFmpeg
203214
if(BUILD_ALL OR BUILD_ALL_SUNSHINE OR BUILD_FFMPEG)
204215
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ffmpeg/_main.cmake)
205216
endif()

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ This is a common set of pre-compiled dependencies for [LizardByte/Sunshine](http
1717
checkout dist
1818
```
1919

20-
## Plans
21-
22-
- [ ] Add more dependencies
23-
- [ ] boost
24-
- [ ] cuda (developer toolkit)
25-
- [ ] build linux dependencies in Docker (to more closely align with target environments)
26-
2720
## License
2821

2922
This repo is licensed under the MIT License, but this does not cover submodules or patches.

cmake/boost/_main.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
list(APPEND BOOST_COMPONENTS_BASE
2+
asio
3+
crc
4+
format
5+
process
6+
property_tree
7+
)
8+
9+
if(BUILD_ALL_LIBDISPLAYDEVICE OR BUILD_ALL_SUNSHINE)
10+
list(APPEND BOOST_COMPONENTS
11+
algorithm
12+
preprocessor
13+
scope
14+
uuid
15+
)
16+
endif()
17+
if(BUILD_ALL_SUNSHINE)
18+
list(APPEND BOOST_COMPONENTS
19+
filesystem
20+
locale
21+
log
22+
program_options
23+
system
24+
)
25+
endif()
26+
27+
set(BOOST_ENABLE_CMAKE OFF) # disable installing cmake files
28+
set(BOOST_INCLUDE_LIBRARIES ${BOOST_COMPONENTS_BASE} ${BOOST_COMPONENTS})
29+
set(BOOST_SKIP_INSTALL_RULES OFF) # disabled to allow installation of Boost libraries
30+
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
31+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third-party/boost boost SYSTEM)

third-party/boost

Submodule boost added at c89e626

0 commit comments

Comments
 (0)