Skip to content

Commit

Permalink
Update libav dependencies to version 2023-11-03-x64
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed May 4, 2024
1 parent da3620f commit 1e3dbfb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
37 changes: 30 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,36 @@ if(ENABLE_QT)
AUTORCC ON)
endif()

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/.deps/obs-deps-2023-11-03-x64/include")
target_link_libraries(
${CMAKE_PROJECT_NAME}
PRIVATE "${CMAKE_SOURCE_DIR}/.deps/obs-deps-2023-11-03-x64/lib/avcodec.lib"
"${CMAKE_SOURCE_DIR}/.deps/obs-deps-2023-11-03-x64/lib/avformat.lib"
"${CMAKE_SOURCE_DIR}/.deps/obs-deps-2023-11-03-x64/lib/avutil.lib"
"${CMAKE_SOURCE_DIR}/.deps/obs-deps-2023-11-03-x64/lib/swresample.lib")
function(find_libav)
if(NOT buildspec)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)
endif()
string(
JSON
version
GET
${buildspec}
dependencies
prebuilt
version)

if(MSVC)
set(arch ${CMAKE_GENERATOR_PLATFORM})
elseif(APPLE)
set(arch universal)
endif()
set(deps_root "${CMAKE_CURRENT_SOURCE_DIR}/.deps/obs-deps-${version}-${arch}")

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE "${deps_root}/include")
target_link_libraries(
${CMAKE_PROJECT_NAME}
PRIVATE "${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}avcodec${CMAKE_STATIC_LIBRARY_SUFFIX}"
"${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}avformat${CMAKE_STATIC_LIBRARY_SUFFIX}"
"${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}avutil${CMAKE_STATIC_LIBRARY_SUFFIX}"
"${deps_root}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}swresample${CMAKE_STATIC_LIBRARY_SUFFIX}")
endfunction(find_libav)

find_libav()

set(USE_SYSTEM_CURL
OFF
Expand Down
2 changes: 1 addition & 1 deletion buildspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"name": "obs-cleanstream",
"version": "0.0.5",
"version": "0.0.6",
"author": "Roy Shilkrot",
"website": "https://github.com/occ-ai/obs-cleanstream/",
"email": "[email protected]",
Expand Down

0 comments on commit 1e3dbfb

Please sign in to comment.