BelledonneCommunications / mediastreamer2

Linphone.org mirror for mediastreamer2 (git://git.linphone.org/mediastreamer2.git)
http://linphone.org
GNU Affero General Public License v3.0
133 stars 104 forks source link

[Bug]: `libaom-dev`, `libaom-devel`, `libdav1d-dev`, `dav1d-devel`, `libdav1d-devel` libraries from distribution not found by `CMakeLists.txt` and `FindAom.cmake` (OBS Build Service) #45

Open leukimi opened 10 months ago

leukimi commented 10 months ago

Context

Compiling stand-alone with OBS Build Service, libaom-dev and libdav1d-dev development files is reported not found, although installed on the system from repository.

[   34s] -- Could NOT find Dav1d (missing: Dav1d_TARGET) 
[   34s] CMake Warning at CMakeLists.txt:414 (message):
[   34s]   Could not find dav1d, mediastreamer2 will be compiled without AV1 support.
[   34s] 
[   34s] 
[   34s] -- Could NOT find Aom (missing: Aom_TARGET) 
[   34s] CMake Warning at CMakeLists.txt:419 (message):
[   34s]   Could not find aom, mediastreamer2 will be compiled without AV1 support.

Compiling as a bundle on OBS Build Service, those development libraries are found.

[  140s] -- Found Dav1d: libdav1d  
[  140s] -- Found Aom: aom  

It seems that aom and dav1d development files [ -dev or -devel ] is only searched for in the build directory cmake file location, not in the system package install location. In FindAom.cmake there seems to be a mismatch with "_Aom" vs "Aom" . /usr/lib64, /usr/lib/x86_64-linux-gnu are other places where aom might install its library.

    find_path(Aom_INCLUDE_DIRS
        NAMES aom/aomcx.h
        HINTS _Aom_ROOT_PATHS
        PATH_SUFFIXES include
    )

    find_library(Aom_LIBRARY
        NAMES aom
        HINTS _Aom_ROOT_PATHS
        PATH_SUFFIXES bin lib lib/Win32
    )

    if(_Aom_INCLUDE_DIRS AND _Aom_LIBRARY)

Log Archlinux Log openSUSE Tumbleweed Log Fedora 39 Log Ubuntu 22.04

General information

Expected behaviour

I wanted to add aom AV1 video encoder/decoder.

To Reproduce

  1. Go to package page

Additional context

No response

SDK logs URL

No response