diff --git a/CMakeLists.txt b/CMakeLists.txt index f395b505f..885cabff9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,7 +279,12 @@ endif() # set(ZLIB_LIBRARIES "-lz") # endif() -find_package(ffmpeg COMPONENTS avutil swscale avformat avcodec) +set(FFMPEG_COMPONENTS avutil swscale avformat avcodec) +if(APPLE_IOS) + list(APPEND FFMPEG_COMPONENTS swresample) +endif() +find_package(ffmpeg COMPONENTS ${FFMPEG_COMPONENTS}) + option(FORCE_BUNDLED_MINIZIP "Force bundled Minizip library" OFF) if(NOT FORCE_BUNDLED_MINIZIP) find_package(minizip) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 5264233a5..95f05c45d 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -187,7 +187,23 @@ if(WIN32) target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH) elseif(APPLE_IOS) target_link_libraries(vcmiclient PRIVATE - "-framework Foundation -framework UIKit -framework QuartzCore -framework CoreGraphics -framework CoreServices -framework ImageIO -framework Metal -framework OpenGLES -framework AVFoundation -framework GameController -framework CoreMotion -weak_framework CoreHaptics" + "-lbz2" + "-framework AudioToolbox" + "-framework AVFoundation" + "-framework CoreGraphics" + "-framework CoreMedia" + "-framework CoreMotion" + "-framework CoreServices" + "-framework CoreVideo" + "-framework Foundation" + "-framework GameController" + "-framework ImageIO" + "-framework Metal" + "-framework OpenGLES" + "-framework QuartzCore" + "-framework UIKit" + "-framework VideoToolbox" + "-weak_framework CoreHaptics" ) set(ENTITLEMENTS_OUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/VCMI.entitlements) @@ -214,7 +230,7 @@ target_link_libraries(vcmiclient PRIVATE if(ffmpeg_LIBRARIES) target_link_libraries(vcmiclient PRIVATE - ffmpeg::swscale ffmpeg::avutil ffmpeg::avcodec ffmpeg::avformat + ${ffmpeg_LIBRARIES} ) else() target_compile_definitions(vcmiclient PRIVATE DISABLE_VIDEO)