CatxFish / obs-v4l2sink

obs studio output plugin for Video4Linux2 device
GNU General Public License v2.0
936 stars 99 forks source link

Can't build on ubuntu 20.04 without the official OBS PPA #41

Closed 0atman closed 4 years ago

0atman commented 4 years ago

I followed the instructions, but cmake couldn't find libobs:

$ cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
-- Could NOT find Libobs (missing: LIBOBS_LIB) 
CMake Error at external/FindLibObs.cmake:106 (message):
  Could not find the libobs library
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!
See also "/home/oatman/Downloads/obs-v4l2sink/build/CMakeFiles/CMakeOutput.log".

But the libobs IS in that directory:

$ ls ../../obs-studio/libobs
audio-monitoring/             obs-data.h             obs-output.h
callback/                     obs-defs.h             obs-properties.c
CMakeLists.txt                obs-display.c          obs-properties.h
data/                         obs-encoder.c          obs-scene.c
graphics/                     obs-encoder.h          obs-scene.h
LibObsConfig.cmake.in         obs-ffmpeg-compat.h    obs-service.c
LibObsConfigVersion.cmake.in  obs.h                  obs-service.h
libobs.pc.in                  obs-hotkey.c           obs-source.c
media-io/                     obs-hotkey.h           obs-source-deinterlace.c
obs-audio.c                   obs-hotkey-name-map.c  obs-source.h
obs-audio-controls.c          obs-hotkeys.h          obs-source-transition.c
obs-audio-controls.h          obs.hpp                obs-ui.h
obs-avc.c                     obs-interaction.h      obs-video.c
obs-avc.h                     obs-internal.h         obs-video-gpu-encode.c
obs.c                         obs-module.c           obs-view.c
obs-cocoa.m                   obs-module.h           obs-win-crash-handler.c
obs-config.h                  obs-nix.c              obs-windows.c
obsconfig.h.in                obs-output.c           util/
obs-data.c                    obs-output-delay.c

The way to solve it for me, was to install the PPA version of obs-studio, then it spookily was able to be built.

$ sudo add-apt-repository ppa:obsproject/obs-studio
$ sudo apt-get update
$ sudo apt-get install obs-studio
[...]
$ cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
-- Found Libobs: /usr/sbin/../lib/libobs.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oatman/Downloads/obs-v4l2sink/build

¯\_(ツ)_/¯

0atman commented 4 years ago

I'm on a freshly-installed-today ubuntu 20.04

nisrulz commented 4 years ago

You need libobs-dev

apt install libobs-dev
0atman commented 4 years ago

Oh I see! That explains that.

rdlmda commented 4 years ago

On fedora it's obs-studio-devel