Skip to content

Commit

Permalink
CI: added libva to release
Browse files Browse the repository at this point in the history
  • Loading branch information
BartSte authored and Bart-Steensma committed Jan 25, 2024
1 parent 672f428 commit 1f9cf72
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Build vulkan
run: ./scripts/build-vulkan

- name: Build libva
run: ./scripts/build-libva $PWD/3rdparty/libva -s $PWD/libva

- name: Install project dependencies
run: |
sudo apt-get install -y libboost-all-dev libspdlog-dev
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ more information.
- [ ] Cross compile for raspberry pi
- [ ] Segmentation fault when running --record without a camera being
available.
- [ ] Fix release workflow such that it links libva correctly to static ffmpeg.
- [ ] Fix issue with ffmpeg + hw acceleration on my arch machine:

```
Expand Down
15 changes: 13 additions & 2 deletions cmake/Find.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,25 @@ function(find_libva)
set(libva_shorts va va-drm va-wayland va-x11)
set(libva_longs LIBVA_LIBRARY LIBVA_DRM_LIBRARY LIBVA_WAYLAND_LIBRARY
LIBVA_X11_LIBRARY)
if(LIBVA_DIR)
message(STATUS "LIBVA_DIR: ${LIBVA_DIR}")
set(find_args PATHS ${LIBVA_DIR} NO_DEFAULT_PATH)
endif()

find_libdrm()
find_path(LIBVA_INCLUDE_DIR NAMES va/va.h)
find_path(
LIBVA_INCLUDE_DIR
NAMES va/va.h
PATH_SUFFIXES include ${find_args})
message(STATUS "LIBVA_INCLUDE_DIR: ${LIBVA_INCLUDE_DIR}")

foreach(libva_short ${libva_shorts})
_short2long(${libva_short}) # creates libva_long

find_library(${libva_long} NAMES ${libva_short})
find_library(
${libva_long}
NAMES ${libva_short}
PATH_SUFFIXES lib ${find_args})
add_library(Libva::${libva_short} UNKNOWN IMPORTED)
set_target_properties(
Libva::${libva_short}
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-libva
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ install_deps() {
}

install_deps_apt() {
sudo apt-get -y install git cmake pkg-config meson libdrm-dev automake libtool autogen
sudo apt-get -y install git cmake pkg-config meson libdrm-dev automake libtool autogen xorg libwayland-dev
}

install_deps_pacman() {
sudo pacman -S --noconfirm git cmake pkg-config meson libdrm automake libtool autogen
sudo pacman -S --noconfirm git cmake pkg-config meson libdrm automake libtool autogen xorg wayland
}

build_libva() {
Expand Down
2 changes: 2 additions & 0 deletions scripts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ root="$this_dir/.."
patch=true
qt_dir="$root/3rdparty/Qt"
ffmpeg_dir="$root/3rdparty/ffmpeg"
libva_dir="$root/3rdparty/libva"
build_type="Release"

clean() {
Expand All @@ -53,6 +54,7 @@ configure() {
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE="$build_type" \
-DFFMPEG_DIR="$ffmpeg_dir" \
-DLIBVA_DIR="$libva_dir" \
-DCMAKE_PREFIX_PATH="$qt_dir/lib/cmake" \
"$@"
}
Expand Down

0 comments on commit 1f9cf72

Please sign in to comment.