diff --git a/README.md b/README.md index 80c2ed7..e302bab 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ blocky ==== +## CMake command + +When you built openh264 on `/home/user/openh264`: +``` +cmake -DCMAKE_CXX_FLAGS=-isystem\ /home/user/openh264/codec/api\ -L/home/user/openh264 .. +``` + ## ffmpeg useful commands ``` diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 2dd1a71..df2665a 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -120,6 +120,26 @@ target_sources(implot ) +# ---- minimp4 ---- +# repository: https://github.com/lieff/minimp4 +# license : CC0 + +FetchContent_Declare( + minimp4 + URL "https://github.com/lieff/minimp4/archive/4575afb4f69ace25a1a048e25cc86bf8c8d14f2b.zip" +) +FetchContent_Populate(minimp4) + +add_library(minimp4) +target_include_directories(minimp4 PUBLIC SYSTEM ${minimp4_SOURCE_DIR}) +target_sources(minimp4 + PUBLIC + "${minimp4_SOURCE_DIR}/minimp4.h" + PRIVATE + minimp4.c +) + + # ---- stb ---- FetchContent_Declare( stb diff --git a/thirdparty/minimp4.c b/thirdparty/minimp4.c new file mode 100644 index 0000000..909b403 --- /dev/null +++ b/thirdparty/minimp4.c @@ -0,0 +1,2 @@ +#define MINIMP4_IMPLEMENTATION +#include