diff --git a/.gitignore b/.gitignore index 2604c20..9f149bb 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ # Ignore build folders **/build +**/lib # Ignore platform specific build folders build-*/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e98a2d..5918f8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -16,6 +18,7 @@ add_library(${PROJECT_NAME} SHARED set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$: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() @@ -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") diff --git a/README.md b/README.md index 3cc00aa..78cd44d 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file