Skip to content

Commit

Permalink
chore: update linux building docs. Invert logic to prefer building wi…
Browse files Browse the repository at this point in the history
…th system dependencies
  • Loading branch information
Julusian committed Jan 24, 2025
1 parent 9465f71 commit 584a64c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
17 changes: 11 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,22 @@ Before beginning, check the build options section below, to decide if you want t
1. `git clone --single-branch --branch master https://github.com/CasparCG/server casparcg-server-master`
2. `cd casparcg-server-master`
3. Install dependencies, this can be done with `sudo ./tools/linux/install-dependencies`
4. `mkdir build && cd build`
5. `cmake ../src`
6. If not using system ffmpeg, run `./_deps/ffmpeg-lib-src/ffmpeg/install-ffmpeg-dependencies` to install the dependencies needed by the ffmpeg build
7. `make -j8`
4. If not using system ffmpeg, run `./_deps/ffmpeg-lib-src/ffmpeg/install-ffmpeg-dependencies` to install the dependencies needed by the ffmpeg build
5. If using system CEF, `sudo add-apt-repository ppa:casparcg/ppa` and `sudo apt-get install casparcg-cef-131-dev`
6. `mkdir build && cd build`
7. `cmake ../src`
8. `make -j8`

If all goes to plan, a folder called 'staging' has been created with everything you need to run CasparCG server.

## Build options

-DENABLE_HTML=OFF - useful if you lack CEF, and would like to build without that module.

-DUSE_STATIC_BOOST=OFF - (Linux only) link against shared version of Boost.
-DUSE_STATIC_BOOST=ON - (Linux only, default OFF) statically link against Boost.

-DUSE_SYSTEM_FFMPEG - (Linux only) use the version of ffmpeg from your OS.
-DUSE_SYSTEM_FFMPEG=OFF - (Linux only, default ON) use the version of ffmpeg from your OS.

-DUSE_SYSTEM_CEF=OFF - (Linux only, default ON) use the version of CEF from your OS. This expects to be using builds from https://launchpad.net/~casparcg/+archive/ubuntu/ppa

-DDIAG_FONT_PATH - Specify an alternate path/font to use for the DIAG window. On linux, this will often want to be set to an absolute path of a font
5 changes: 3 additions & 2 deletions src/CMakeModules/Bootstrap_Linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ if(POLICY CMP0167)
endif()

set(ENABLE_HTML ON CACHE BOOL "Enable CEF and HTML producer")
set(USE_STATIC_BOOST ON CACHE BOOL "Use shared library version of Boost")
set(USE_SYSTEM_FFMPEG OFF CACHE BOOL "Use the version of ffmpeg from your OS")
set(USE_STATIC_BOOST OFF CACHE BOOL "Use shared library version of Boost")
set(USE_SYSTEM_FFMPEG ON CACHE BOOL "Use the version of ffmpeg from your OS")
set(USE_SYSTEM_CEF ON CACHE BOOL "Use the version of cef from your OS (only tested with Ubuntu)")

# Determine build (target) platform
SET (PLATFORM_FOLDER_NAME "linux")
Expand Down
2 changes: 1 addition & 1 deletion tools/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM docker.io/buildpack-deps:jammy as build-casparcg
ARG CXX
ARG GIT_HASH

RUN cmake -GNinja /source
RUN cmake -GNinja /source -DUSE_STATIC_BOOST=ON -DUSE_SYSTEM_FFMPEG=OFF -DUSE_SYSTEM_CEF=OFF

# ensure ffmpeg dependencies are installed
RUN apt-get update && ./_deps/ffmpeg-lib-src/ffmpeg/install-ffmpeg-dependencies
Expand Down

0 comments on commit 584a64c

Please sign in to comment.