@@ -797,6 +797,60 @@ def parseopts(args):
797
797
elif os .path .isfile (GetThirdpartyDir () + "ffmpeg/lib/libavcodec.a" ):
798
798
# Needed when linking ffmpeg statically on Linux.
799
799
LibName ("FFMPEG" , "-Wl,-Bsymbolic" )
800
+ # Don't export ffmpeg symbols from libp3ffmpeg when linking statically.
801
+ for ffmpeg_lib in ffmpeg_libs :
802
+ LibName ("FFMPEG" , "-Wl,--exclude-libs,%s.a" % (ffmpeg_lib ))
803
+
804
+ if GetTarget () != "darwin" :
805
+ for fcollada_lib in fcollada_libs :
806
+ LibName ("FCOLLADA" , "-Wl,--exclude-libs,lib%s.a" % (fcollada_lib ))
807
+
808
+ if not PkgSkip ("SWSCALE" ):
809
+ LibName ("SWSCALE" , "-Wl,--exclude-libs,libswscale.a" )
810
+
811
+ if not PkgSkip ("SWRESAMPLE" ):
812
+ LibName ("SWRESAMPLE" , "-Wl,--exclude-libs,libswresample.a" )
813
+
814
+ if not PkgSkip ("JPEG" ):
815
+ LibName ("JPEG" , "-Wl,--exclude-libs,libjpeg.a" )
816
+
817
+ if not PkgSkip ("TIFF" ):
818
+ LibName ("TIFF" , "-Wl,--exclude-libs,libtiff.a" )
819
+
820
+ if not PkgSkip ("PNG" ):
821
+ LibName ("PNG" , "-Wl,--exclude-libs,libpng.a" )
822
+ LibName ("PNG" , "-Wl,--exclude-libs,libpng16.a" )
823
+
824
+ if not PkgSkip ("SQUISH" ):
825
+ LibName ("SQUISH" , "-Wl,--exclude-libs,libsquish.a" )
826
+
827
+ if not PkgSkip ("OPENEXR" ):
828
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libHalf.a" )
829
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libIex.a" )
830
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libIexMath.a" )
831
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libIlmImf.a" )
832
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libIlmImfUtil.a" )
833
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libIlmThread.a" )
834
+ LibName ("OPENEXR" , "-Wl,--exclude-libs,libImath.a" )
835
+
836
+ if not PkgSkip ("VORBIS" ):
837
+ LibName ("VORBIS" , "-Wl,--exclude-libs,libogg.a" )
838
+ LibName ("VORBIS" , "-Wl,--exclude-libs,libvorbis.a" )
839
+ LibName ("VORBIS" , "-Wl,--exclude-libs,libvorbisenc.a" )
840
+ LibName ("VORBIS" , "-Wl,--exclude-libs,libvorbisfile.a" )
841
+
842
+ if not PkgSkip ("OPUS" ):
843
+ LibName ("OPUS" , "-Wl,--exclude-libs,libogg.a" )
844
+ LibName ("OPUS" , "-Wl,--exclude-libs,libopus.a" )
845
+ LibName ("OPUS" , "-Wl,--exclude-libs,libopusfile.a" )
846
+
847
+ if not PkgSkip ("VRPN" ):
848
+ LibName ("VRPN" , "-Wl,--exclude-libs,libvrpn.a" )
849
+ LibName ("VRPN" , "-Wl,--exclude-libs,libquat.a" )
850
+
851
+ if not PkgSkip ("ARTOOLKIT" ):
852
+ LibName ("ARTOOLKIT" , "-Wl,--exclude-libs,libAR.a" )
853
+ LibName ("ARTOOLKIT" , "-Wl,--exclude-libs,libARMulti.a" )
800
854
801
855
if PkgSkip ("FFMPEG" ) or GetTarget () == "darwin" :
802
856
cv_lib = ChooseLib (("opencv_core" , "cv" ), "OPENCV" )
@@ -809,10 +863,13 @@ def parseopts(args):
809
863
else :
810
864
PkgDisable ("OPENCV" )
811
865
812
- if GetTarget () == "darwin" and not PkgSkip ("OPENAL" ):
813
- LibName ("OPENAL" , "-framework AudioUnit" )
814
- LibName ("OPENAL" , "-framework AudioToolbox" )
815
- LibName ("OPENAL" , "-framework CoreAudio" )
866
+ if not PkgSkip ("OPENAL" ):
867
+ if GetTarget () == "darwin" :
868
+ LibName ("OPENAL" , "-framework AudioUnit" )
869
+ LibName ("OPENAL" , "-framework AudioToolbox" )
870
+ LibName ("OPENAL" , "-framework CoreAudio" )
871
+ else :
872
+ LibName ("OPENAL" , "-Wl,--exclude-libs,libopenal.a" )
816
873
817
874
if not PkgSkip ("ASSIMP" ) and \
818
875
os .path .isfile (GetThirdpartyDir () + "assimp/lib/libassimp.a" ):
@@ -821,6 +878,10 @@ def parseopts(args):
821
878
if os .path .isfile (irrxml ):
822
879
LibName ("ASSIMP" , irrxml )
823
880
881
+ if GetTarget () != "darwin" :
882
+ LibName ("ASSIMP" , "-Wl,--exclude-libs,libassimp.a" )
883
+ LibName ("ASSIMP" , "-Wl,--exclude-libs,libIrrXML.a" )
884
+
824
885
if not PkgSkip ("PYTHON" ):
825
886
python_lib = SDK ["PYTHONVERSION" ]
826
887
SmartPkgEnable ("PYTHON" , "" , python_lib , (SDK ["PYTHONVERSION" ], SDK ["PYTHONVERSION" ] + "/Python.h" ))
@@ -833,6 +894,10 @@ def parseopts(args):
833
894
SmartPkgEnable ("ZLIB" , "zlib" , ("z" ), "zlib.h" )
834
895
SmartPkgEnable ("GTK2" , "gtk+-2.0" )
835
896
897
+ if not PkgSkip ("OPENSSL" ) and GetTarget () != "darwin" :
898
+ LibName ("OPENSSL" , "-Wl,--exclude-libs,libssl.a" )
899
+ LibName ("OPENSSL" , "-Wl,--exclude-libs,libcrypto.a" )
900
+
836
901
if GetTarget () != 'darwin' :
837
902
# CgGL is covered by the Cg framework, and we don't need X11 components on OSX
838
903
if not PkgSkip ("NVIDIACG" ):
@@ -3207,7 +3272,7 @@ def get_config_express():
3207
3272
TargetAdd ('interrogate.exe' , input = 'libp3cppParser.ilb' )
3208
3273
TargetAdd ('interrogate.exe' , input = COMMON_DTOOL_LIBS )
3209
3274
TargetAdd ('interrogate.exe' , input = 'libp3interrogatedb.dll' )
3210
- TargetAdd ('interrogate.exe' , opts = ['ADVAPI' , 'OPENSSL' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3275
+ TargetAdd ('interrogate.exe' , opts = ['ADVAPI' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3211
3276
3212
3277
preamble = WriteEmbeddedStringFile ('interrogate_preamble_python_native' , inputs = [
3213
3278
'dtool/src/interrogatedb/py_panda.cxx' ,
@@ -3222,14 +3287,14 @@ def get_config_express():
3222
3287
TargetAdd ('interrogate_module.exe' , input = 'libp3cppParser.ilb' )
3223
3288
TargetAdd ('interrogate_module.exe' , input = COMMON_DTOOL_LIBS )
3224
3289
TargetAdd ('interrogate_module.exe' , input = 'libp3interrogatedb.dll' )
3225
- TargetAdd ('interrogate_module.exe' , opts = ['ADVAPI' , 'OPENSSL' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3290
+ TargetAdd ('interrogate_module.exe' , opts = ['ADVAPI' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3226
3291
3227
3292
TargetAdd ('parse_file_parse_file.obj' , opts = OPTS , input = 'parse_file.cxx' )
3228
3293
TargetAdd ('parse_file.exe' , input = 'parse_file_parse_file.obj' )
3229
3294
TargetAdd ('parse_file.exe' , input = 'libp3cppParser.ilb' )
3230
3295
TargetAdd ('parse_file.exe' , input = COMMON_DTOOL_LIBS )
3231
3296
TargetAdd ('parse_file.exe' , input = 'libp3interrogatedb.dll' )
3232
- TargetAdd ('parse_file.exe' , opts = ['ADVAPI' , 'OPENSSL' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3297
+ TargetAdd ('parse_file.exe' , opts = ['ADVAPI' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3233
3298
3234
3299
#
3235
3300
# DIRECTORY: dtool/src/prckeys/
@@ -3240,7 +3305,7 @@ def get_config_express():
3240
3305
TargetAdd ('make-prc-key_makePrcKey.obj' , opts = OPTS , input = 'makePrcKey.cxx' )
3241
3306
TargetAdd ('make-prc-key.exe' , input = 'make-prc-key_makePrcKey.obj' )
3242
3307
TargetAdd ('make-prc-key.exe' , input = COMMON_DTOOL_LIBS )
3243
- TargetAdd ('make-prc-key.exe' , opts = ['ADVAPI' , 'OPENSSL' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3308
+ TargetAdd ('make-prc-key.exe' , opts = ['ADVAPI' , 'OPENSSL' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3244
3309
3245
3310
#
3246
3311
# DIRECTORY: dtool/src/test_interrogate/
@@ -3251,7 +3316,7 @@ def get_config_express():
3251
3316
TargetAdd ('test_interrogate.exe' , input = 'test_interrogate_test_interrogate.obj' )
3252
3317
TargetAdd ('test_interrogate.exe' , input = 'libp3interrogatedb.dll' )
3253
3318
TargetAdd ('test_interrogate.exe' , input = COMMON_DTOOL_LIBS )
3254
- TargetAdd ('test_interrogate.exe' , opts = ['ADVAPI' , 'OPENSSL' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3319
+ TargetAdd ('test_interrogate.exe' , opts = ['ADVAPI' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ])
3255
3320
3256
3321
#
3257
3322
# DIRECTORY: dtool/src/dtoolbase/
@@ -3352,7 +3417,7 @@ def get_config_express():
3352
3417
TargetAdd ('libpandaexpress.dll' , input = 'p3express_composite2.obj' )
3353
3418
TargetAdd ('libpandaexpress.dll' , input = 'p3pandabase_pandabase.obj' )
3354
3419
TargetAdd ('libpandaexpress.dll' , input = COMMON_DTOOL_LIBS )
3355
- TargetAdd ('libpandaexpress.dll' , opts = ['ADVAPI' , 'WINSOCK2' , 'OPENSSL' , 'ZLIB' , 'WINGDI' , 'WINUSER' , 'ANDROID' ])
3420
+ TargetAdd ('libpandaexpress.dll' , opts = ['ADVAPI' , 'WINSOCK2' , 'OPENSSL' , 'ZLIB' , 'WINGDI' , 'WINUSER' , 'ANDROID' ])
3356
3421
3357
3422
#
3358
3423
# DIRECTORY: panda/src/pipeline/
@@ -4151,7 +4216,7 @@ def get_config_express():
4151
4216
#
4152
4217
4153
4218
if (PkgSkip ("OPENSSL" )== 0 and PkgSkip ("DEPLOYTOOLS" )== 0 ):
4154
- OPTS = ['DIR:panda/src/downloadertools' , 'OPENSSL' , ' ADVAPI' , 'WINSOCK2' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ]
4219
+ OPTS = ['DIR:panda/src/downloadertools' , 'ADVAPI' , 'WINSOCK2' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ]
4155
4220
4156
4221
TargetAdd ('pdecrypt_pdecrypt.obj' , opts = OPTS , input = 'pdecrypt.cxx' )
4157
4222
TargetAdd ('pdecrypt.exe' , input = ['pdecrypt_pdecrypt.obj' ])
@@ -4168,7 +4233,7 @@ def get_config_express():
4168
4233
#
4169
4234
4170
4235
if (PkgSkip ("ZLIB" )== 0 and PkgSkip ("DEPLOYTOOLS" )== 0 ):
4171
- OPTS = ['DIR:panda/src/downloadertools' , 'ZLIB' , 'OPENSSL' , ' ADVAPI' , 'WINSOCK2' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ]
4236
+ OPTS = ['DIR:panda/src/downloadertools' , 'ZLIB' , 'ADVAPI' , 'WINSOCK2' , 'WINSHELL' , 'WINGDI' , 'WINUSER' ]
4172
4237
4173
4238
TargetAdd ('multify_multify.obj' , opts = OPTS , input = 'multify.cxx' )
4174
4239
TargetAdd ('multify.exe' , input = ['multify_multify.obj' ])
@@ -4748,10 +4813,10 @@ def get_config_express():
4748
4813
#
4749
4814
4750
4815
if (PkgSkip ("DIRECT" )== 0 ):
4751
- OPTS = ['DIR:direct/src/distributed' , 'DIR:direct/src/dcparser' , 'WITHINPANDA' , 'BUILDING:DIRECT' , 'OPENSSL' ]
4816
+ OPTS = ['DIR:direct/src/distributed' , 'DIR:direct/src/dcparser' , 'WITHINPANDA' , 'BUILDING:DIRECT' ]
4752
4817
TargetAdd ('p3distributed_config_distributed.obj' , opts = OPTS , input = 'config_distributed.cxx' )
4753
4818
4754
- OPTS = ['DIR:direct/src/distributed' , 'WITHINPANDA' , 'OPENSSL' ]
4819
+ OPTS = ['DIR:direct/src/distributed' , 'WITHINPANDA' ]
4755
4820
IGATEFILES = GetDirectoryContents ('direct/src/distributed' , ["*.h" , "*.cxx" ])
4756
4821
TargetAdd ('libp3distributed.in' , opts = OPTS , input = IGATEFILES )
4757
4822
TargetAdd ('libp3distributed.in' , opts = ['IMOD:panda3d.direct' , 'ILIB:libp3distributed' , 'SRCDIR:direct/src/distributed' ])
@@ -4819,7 +4884,7 @@ def get_config_express():
4819
4884
TargetAdd ('libp3direct.dll' , input = 'p3motiontrail_config_motiontrail.obj' )
4820
4885
TargetAdd ('libp3direct.dll' , input = 'p3motiontrail_cMotionTrail.obj' )
4821
4886
TargetAdd ('libp3direct.dll' , input = COMMON_PANDA_LIBS )
4822
- TargetAdd ('libp3direct.dll' , opts = ['ADVAPI' , 'OPENSSL' , 'WINUSER' , 'WINGDI' ])
4887
+ TargetAdd ('libp3direct.dll' , opts = ['ADVAPI' , 'WINUSER' , 'WINGDI' ])
4823
4888
4824
4889
PyTargetAdd ('direct_module.obj' , input = 'libp3dcparser.in' )
4825
4890
PyTargetAdd ('direct_module.obj' , input = 'libp3showbase.in' )
@@ -4847,7 +4912,7 @@ def get_config_express():
4847
4912
PyTargetAdd ('direct.pyd' , input = 'libp3direct.dll' )
4848
4913
PyTargetAdd ('direct.pyd' , input = 'libp3interrogatedb.dll' )
4849
4914
PyTargetAdd ('direct.pyd' , input = COMMON_PANDA_LIBS )
4850
- PyTargetAdd ('direct.pyd' , opts = ['OPENSSL' , ' WINUSER' , 'WINGDI' , 'WINSOCK2' ])
4915
+ PyTargetAdd ('direct.pyd' , opts = ['WINUSER' , 'WINGDI' , 'WINSOCK2' ])
4851
4916
4852
4917
#
4853
4918
# DIRECTORY: direct/src/dcparse/
0 commit comments