Skip to content

Commit

Permalink
change cmakelists and readme again
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnut committed Oct 14, 2024
1 parent e94ecbc commit ac3b563
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

# Ignore build folders
**/build
**/lib
# Ignore platform specific build folders
build-*/

Expand Down
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
if (MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
endif()

project(ffmpeg-api VERSION 1.0.0)

Expand All @@ -16,6 +18,7 @@ add_library(${PROJECT_NAME} SHARED

set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Final>:Final>")


if (NOT DEFINED ENV{GEODE_SDK})
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode")
else()
Expand All @@ -39,8 +42,14 @@ if (WIN32)
${CMAKE_SOURCE_DIR}/lib/swscale.lib
${CMAKE_SOURCE_DIR}/lib/libx264.lib
${CMAKE_SOURCE_DIR}/lib/x265-static.lib
Ws2_32.lib mfplat.lib mf.lib secur32.lib crypt32.lib mfuuid.lib
mf mfplat mfuuid bcrypt strmiids.lib
${CMAKE_SOURCE_DIR}/lib/ws2_32.lib
${CMAKE_SOURCE_DIR}/lib/mfplat.lib
${CMAKE_SOURCE_DIR}/lib/mf.lib
${CMAKE_SOURCE_DIR}/lib/secur32.lib
${CMAKE_SOURCE_DIR}/lib/crypt32.lib
${CMAKE_SOURCE_DIR}/lib/mfuuid.lib
${CMAKE_SOURCE_DIR}/lib/bcrypt.lib
${CMAKE_SOURCE_DIR}/lib/strmiids.lib
) # windows
elseif (ANDROID)
if (ANDROID_ABI STREQUAL "arm64-v8a")
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ To get the needed libraries on Windows, you can use vcpkg:
```sh
vcpkg install ffmpeg[core,avcodec,avformat,avutil,swscale,swresample,amf,x264,x265,nvcodec]:x64-windows-static --recurse
```
the other libraries are part of the Windows SDK

## Android
Clone [this](https://github.com/EclipseMenu/ffmpeg-android-maker/) repository and run ffmpeg-android-maker.sh, this will produce static libraries in the build folder:
To get the needed libraries on Android, you can use [this](https://github.com/EclipseMenu/ffmpeg-android-maker/) script. Read the README in the repository for further instructions.
```sh
git clone https://github.com/EclipseMenu/ffmpeg-android-maker/
cd ffmpeg-android-maker
./ffmpeg-android-maker.sh
```
Read the README in the repository for further instructions.

You can either run it natively on Linux or using WSL on Windows.

0 comments on commit ac3b563

Please sign in to comment.