include_guard(GLOBAL) set(Aethera_FFmpeg_root "${CMAKE_CURRENT_LIST_DIR}/ffmpeg-9.0.1-full_build-shared") file(GLOB Aethera_FFmpeg_runtime_libraries CONFIGURE_DEPENDS "${Aethera_FFmpeg_root}/bin/*.dll") if (NOT Aethera_FFmpeg_runtime_libraries) message(FATAL_ERROR "Aethera FFmpeg runtime libraries were not found") endif () foreach(component IN ITEMS avutil avcodec swscale) add_library(Aethera_FFmpeg_${component} SHARED IMPORTED GLOBAL) set_target_properties(Aethera_FFmpeg_${component} PROPERTIES IMPORTED_IMPLIB "${Aethera_FFmpeg_root}/lib/${component}.lib" INTERFACE_INCLUDE_DIRECTORIES "${Aethera_FFmpeg_root}/include") endforeach() set_target_properties(Aethera_FFmpeg_avutil PROPERTIES IMPORTED_LOCATION "${Aethera_FFmpeg_root}/bin/avutil-61.dll") set_target_properties(Aethera_FFmpeg_avcodec PROPERTIES IMPORTED_LOCATION "${Aethera_FFmpeg_root}/bin/avcodec-63.dll") set_target_properties(Aethera_FFmpeg_swscale PROPERTIES IMPORTED_LOCATION "${Aethera_FFmpeg_root}/bin/swscale-10.dll") add_library(Aethera_FFmpeg INTERFACE) add_library(Aethera::FFmpeg ALIAS Aethera_FFmpeg) target_link_libraries(Aethera_FFmpeg INTERFACE Aethera_FFmpeg_avcodec Aethera_FFmpeg_avutil Aethera_FFmpeg_swscale)