Skip to content

Commit 2442d4d

Browse files
feat: add boost
1 parent e0d5524 commit 2442d4d

6 files changed

Lines changed: 53 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
- name: Checkout
9999
uses: actions/checkout@v4
100100
with:
101-
submodules: recursive
101+
submodules: true # not recursive because we don't want to get all boost submodules
102102

103103
- name: Prepare Dependencies Linux
104104
id: cross_compile

.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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,20 @@ project(build-deps
55
VERSION 0.0.0
66
)
77

8+
enable_language(
9+
ASM
10+
C
11+
CXX
12+
)
13+
814
# Main options
915
option(BUILD_ALL "Build all dependencies" ON)
16+
option(BUILD_ALL_LIBDISPLAYDEVICE "Build all libdisplaydevice dependencies" ON)
1017
option(BUILD_ALL_SUNSHINE "Build all Sunshine dependencies" ON)
1118

19+
# Boost options
20+
option(BUILD_BOOST "Build Boost" ON)
21+
1222
# FFmpeg options
1323
option(BUILD_FFMPEG "Build FFmpeg" ON)
1424
option(BUILD_FFMPEG_ALL_PATCHES "Apply FFmpeg patches" ON)
@@ -200,6 +210,12 @@ message(STATUS "Detected system name: ${CMAKE_SYSTEM_NAME}")
200210
message(STATUS "Detected architecture: ${CMAKE_SYSTEM_PROCESSOR}")
201211
message(STATUS "CI Matrix name should be: '${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}'")
202212

213+
# boost
214+
if(BUILD_ALL OR BUILD_ALL_LIBDISPLAYDEVICE OR BUILD_ALL_SUNSHINE OR BUILD_BOOST)
215+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/boost/_main.cmake)
216+
endif()
217+
218+
# FFmpeg
203219
if(BUILD_ALL OR BUILD_ALL_SUNSHINE OR BUILD_FFMPEG)
204220
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ffmpeg/_main.cmake)
205221
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 ON) # Use experimental superproject to pull library dependencies recursively
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)