@@ -561,6 +561,10 @@ def parseopts(args):
561
561
LibName (pkg , 'dxerrVNUM.lib' .replace ("VNUM" , vnum ))
562
562
#LibName(pkg, 'ddraw.lib')
563
563
LibName (pkg , 'dxguid.lib' )
564
+
565
+ if not PkgSkip ("FREETYPE" ) and os .path .isdir (GetThirdpartyDir () + "freetype/include/freetype2" ):
566
+ IncDirectory ("FREETYPE" , GetThirdpartyDir () + "freetype/include/freetype2" )
567
+
564
568
IncDirectory ("ALWAYS" , GetThirdpartyDir () + "extras/include" )
565
569
LibName ("WINSOCK" , "wsock32.lib" )
566
570
LibName ("WINSOCK2" , "wsock32.lib" )
@@ -766,9 +770,13 @@ def parseopts(args):
766
770
SmartPkgEnable ("JPEG" , "" , ("jpeg" ), "jpeglib.h" )
767
771
SmartPkgEnable ("PNG" , "libpng" , ("png" ), "png.h" , tool = "libpng-config" )
768
772
769
- if GetTarget () == "darwin" and not PkgSkip ("FFMPEG" ):
770
- LibName ("FFMPEG" , "-Wl,-read_only_relocs,suppress" )
771
- LibName ("FFMPEG" , "-framework VideoDecodeAcceleration" )
773
+ if not PkgSkip ("FFMPEG" ):
774
+ if GetTarget () == "darwin" :
775
+ LibName ("FFMPEG" , "-Wl,-read_only_relocs,suppress" )
776
+ LibName ("FFMPEG" , "-framework VideoDecodeAcceleration" )
777
+ elif os .path .isfile (GetThirdpartyDir () + "ffmpeg/lib/libavcodec.a" ):
778
+ # Needed when linking ffmpeg statically on Linux.
779
+ LibName ("FFMPEG" , "-Wl,-Bsymbolic" )
772
780
773
781
cv_lib = ChooseLib (("opencv_core" , "cv" ), "OPENCV" )
774
782
if cv_lib == "opencv_core" :
0 commit comments