diff -Naur a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt 2019-10-03 14:52:00.000000000 -0500 +++ b/CMakeLists.txt 2020-03-01 16:07:08.901539309 -0600 @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.12) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -92,6 +92,15 @@ libffmpegthumbnailer/filmstripfilter.cpp ) +target_link_libraries(libffmpegthumbnailerobj + FFmpeg::avformat + FFmpeg::avcodec + FFmpeg::avutil + FFmpeg::avfilter + $<$:${JPEG_LIBRARIES}> + $<$:PNG::PNG> +) + # we use our own deprecated struct menbers, so disable the warning about it set_source_files_properties(libffmpegthumbnailer/videothumbnailerc.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations) @@ -118,12 +127,7 @@ if (ENABLE_STATIC) add_library(libffmpegthumbnailerstatic STATIC $) target_link_libraries(libffmpegthumbnailerstatic - FFmpeg::avformat - FFmpeg::avcodec - FFmpeg::avutil - FFmpeg::avfilter - $<$:${JPEG_LIBRARIES}> - $<$:PNG::PNG> + libffmpegthumbnailerobj $<$:${CMAKE_DL_LIBS}> ) @@ -140,12 +144,7 @@ if (ENABLE_SHARED) add_library(libffmpegthumbnailer SHARED $) target_link_libraries(libffmpegthumbnailer - FFmpeg::avformat - FFmpeg::avcodec - FFmpeg::avutil - FFmpeg::avfilter - $<$:${JPEG_LIBRARIES}> - $<$:PNG::PNG> + libffmpegthumbnailerobj ) set_target_properties(libffmpegthumbnailer PROPERTIES