diff --git a/Src4/ffmpeg.pri b/Src4/ffmpeg.pri index 6c9f6156..a8cca994 100644 --- a/Src4/ffmpeg.pri +++ b/Src4/ffmpeg.pri @@ -1,52 +1,22 @@ -# PEBI动画导出使用的可选FFmpeg n1.1开发包。 -# nmSubWxs默认启用;其他目标可通过CONFIG显式选择是否接入。 -contains(CONFIG, nm_ffmpeg_video_export) { - FFMPEG_11_ROOT = $${geoHome}/3rd/FFmpeg-1.1 - FFMPEG_11_VS2010_COMPAT = $${FFMPEG_11_ROOT}/compat/vs2010 - FFMPEG_11_RUNTIME_DLLS = \ - $${FFMPEG_11_ROOT}/bin/avformat-54.dll \ - $${FFMPEG_11_ROOT}/bin/avcodec-54.dll \ - $${FFMPEG_11_ROOT}/bin/avutil-52.dll \ - $${FFMPEG_11_ROOT}/bin/swscale-2.dll +# PEBI animation export FFmpeg n1.1 dependency. +win32{ - !exists($${FFMPEG_11_ROOT}/include/libavformat/avformat.h) { - error(FFmpeg n1.1 headers were not found in $${FFMPEG_11_ROOT}/include) - } - !exists($${FFMPEG_11_ROOT}/include/libavcodec/avcodec.h) { - error(FFmpeg n1.1 avcodec headers were not found) - } - !exists($${FFMPEG_11_ROOT}/include/libavutil/avutil.h) { - error(FFmpeg n1.1 avutil headers were not found) - } - !exists($${FFMPEG_11_ROOT}/include/libswscale/swscale.h) { - error(FFmpeg n1.1 swscale headers were not found) - } - !exists($${FFMPEG_11_ROOT}/lib/avformat.lib) { - error(FFmpeg n1.1 avformat import library was not found) - } - !exists($${FFMPEG_11_ROOT}/lib/avcodec.lib) { - error(FFmpeg n1.1 avcodec import library was not found) - } - !exists($${FFMPEG_11_ROOT}/lib/avutil.lib) { - error(FFmpeg n1.1 avutil import library was not found) - } - !exists($${FFMPEG_11_ROOT}/lib/swscale.lib) { - error(FFmpeg n1.1 swscale import library was not found) - } - !exists($${FFMPEG_11_VS2010_COMPAT}/inttypes.h) { - error(FFmpeg n1.1 VS2010 compatibility header inttypes.h was not found) - } +DEFINES += NM_ENABLE_FFMPEG_VIDEO_EXPORT - DEFINES += NM_ENABLE_FFMPEG_VIDEO_EXPORT - INCLUDEPATH += $${FFMPEG_11_VS2010_COMPAT} - INCLUDEPATH += $${FFMPEG_11_ROOT}/include - LIBS += -L$${FFMPEG_11_ROOT}/lib - LIBS += -lavformat -lavcodec -lavutil -lswscale +INCLUDEPATH += $${geoHome}/3rd/FFmpeg-1.1/compat/vs2010 +INCLUDEPATH += $${geoHome}/3rd/FFmpeg-1.1/include +DEPENDPATH += $${geoHome}/3rd/FFmpeg-1.1/compat/vs2010 +DEPENDPATH += $${geoHome}/3rd/FFmpeg-1.1/include - for(FFMPEG_11_RUNTIME_DLL, FFMPEG_11_RUNTIME_DLLS) { - !exists($${FFMPEG_11_RUNTIME_DLL}) { - error(FFmpeg runtime DLL was not found: $${FFMPEG_11_RUNTIME_DLL}) - } - QMAKE_POST_LINK += $$QMAKE_COPY $$quote($${FFMPEG_11_RUNTIME_DLL}) $$quote($${DESTDIR}) $$escape_expand(\\n\\t) - } +Debug:LIBS += -L$${geoHome}/3rd/FFmpeg-1.1/lib \ +-lavformat \ +-lavcodec \ +-lavutil \ +-lswscale + +Release:LIBS += -L$${geoHome}/3rd/FFmpeg-1.1/lib \ +-lavformat \ +-lavcodec \ +-lavutil \ +-lswscale } diff --git a/Src4/nmNum/nmSubWxs/nmSubWxs.pro b/Src4/nmNum/nmSubWxs/nmSubWxs.pro index 4f90e551..874def2f 100644 --- a/Src4/nmNum/nmSubWxs/nmSubWxs.pro +++ b/Src4/nmNum/nmSubWxs/nmSubWxs.pro @@ -10,7 +10,6 @@ TEMPLATE = lib include(../../setting.pri) include(../../vtk.pri) -CONFIG += nm_ffmpeg_video_export include(../../ffmpeg.pri) DEFINES += NM_SUB_WXS_LIBRARY