My build terminated with some missing symbols (see below log). Later I noticed that the FFMPEG libraries have been taken out from linking. The build complete to last after comment out the line (see patch). Still new to CMake. Do I miss something? Thx!
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index 2f5120f..dcdda94 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -7,7 +7,7 @@ find_package(FFMpeg REQUIRED
OPTIONAL_COMPONENTS avcodec)
include_directories(${FFMPEG_INCLUDE_DIRS})
----
-list(REMOVE_ITEM FFMPEG_LIBRARIES ${FFMPEG_AVCODEC_LIBRARIES})
+# list(REMOVE_ITEM FFMPEG_LIBRARIES ${FFMPEG_AVCODEC_LIBRARIES})
find_package(ImageMagick QUIET COMPONENTS MagickCore)
------------------------------
% cmake .. && make
-- Jansson >=2.5 not found, building bundled version
-- Found FFMpeg: /opt/local/lib/../lib/libavformat.dylib (found version "56.4.101") found components: avformat avutil swscale swresample avcodec
-- Using ImageMagick for image loading in libobs
-- Libfdk not found - obs-libfdk plugin disabled
-- Found FFMpeg: /opt/local/lib/../lib/libavcodec.dylib (found version "56.1.100") found components: avcodec avutil swscale avformat swresample
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/bennykhoo/Sources/obs-studio/build
[ 0%] Built target glad
[ 6%] Built target jansson
Linking C shared library libobs.dylib
Undefined symbols for architecture x86_64:
"_av_free_packet", referenced from:
_media_remux_job_process in media-remux.c.o
"_avcodec_copy_context", referenced from:
_media_remux_job_create in media-remux.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libobs/libobs.0.dylib] Error 1
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [all] Error 2
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index 2f5120f..dcdda94 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -7,7 +7,7 @@ find_package(FFMpeg REQUIRED
OPTIONAL_COMPONENTS avcodec)
include_directories(${FFMPEG_INCLUDE_DIRS})
----
-list(REMOVE_ITEM FFMPEG_LIBRARIES ${FFMPEG_AVCODEC_LIBRARIES})
+# list(REMOVE_ITEM FFMPEG_LIBRARIES ${FFMPEG_AVCODEC_LIBRARIES})
find_package(ImageMagick QUIET COMPONENTS MagickCore)
------------------------------
% cmake .. && make
-- Jansson >=2.5 not found, building bundled version
-- Found FFMpeg: /opt/local/lib/../lib/libavformat.dylib (found version "56.4.101") found components: avformat avutil swscale swresample avcodec
-- Using ImageMagick for image loading in libobs
-- Libfdk not found - obs-libfdk plugin disabled
-- Found FFMpeg: /opt/local/lib/../lib/libavcodec.dylib (found version "56.1.100") found components: avcodec avutil swscale avformat swresample
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/bennykhoo/Sources/obs-studio/build
[ 0%] Built target glad
[ 6%] Built target jansson
Linking C shared library libobs.dylib
Undefined symbols for architecture x86_64:
"_av_free_packet", referenced from:
_media_remux_job_process in media-remux.c.o
"_avcodec_copy_context", referenced from:
_media_remux_job_create in media-remux.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libobs/libobs.0.dylib] Error 1
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [all] Error 2