|
|
@@ -652,9 +652,14 @@ if (COMPILER == "MSVC"):
|
|
|
if os.path.isfile(GetThirdpartyDir() + "openssl/lib/libpandassl.lib"):
|
|
|
LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib")
|
|
|
LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib")
|
|
|
- else:
|
|
|
+ elif os.path.isfile(GetThirdpartyDir() + "openssl/lib/ssleay32.lib"):
|
|
|
LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libeay32.lib")
|
|
|
LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/ssleay32.lib")
|
|
|
+ else:
|
|
|
+ LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libssl.lib")
|
|
|
+ LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libcrypto.lib")
|
|
|
+ LibName("OPENSSL", "crypt32.lib")
|
|
|
+ LibName("OPENSSL", "ws2_32.lib")
|
|
|
if (PkgSkip("PNG")==0):
|
|
|
if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"):
|
|
|
LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib")
|
|
|
@@ -666,23 +671,39 @@ if (COMPILER == "MSVC"):
|
|
|
else:
|
|
|
LibName("TIFF", GetThirdpartyDir() + "tiff/lib/tiff.lib")
|
|
|
if (PkgSkip("OPENEXR")==0):
|
|
|
- suffix = ""
|
|
|
- if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_2.lib"):
|
|
|
- suffix = "-2_2"
|
|
|
- elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_3.lib"):
|
|
|
- suffix = "-2_3"
|
|
|
- elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_4.lib"):
|
|
|
- suffix = "-2_4"
|
|
|
- LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Imath" + suffix + ".lib")
|
|
|
- if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + "_s.lib"):
|
|
|
- suffix += "_s" # _s suffix observed for OpenEXR 2.3 only so far
|
|
|
- LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + ".lib")
|
|
|
- LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread" + suffix + ".lib")
|
|
|
- LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex" + suffix + ".lib")
|
|
|
- if suffix == "-2_2":
|
|
|
- LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half.lib")
|
|
|
+ if os.path.isfile(GetThirdpartyDir() + "openexr/lib/OpenEXRCore-3_1.lib"):
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/OpenEXR-3_1.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread-3_1.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Imath-3_1.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex-3_1.lib")
|
|
|
+ elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/OpenEXR-3_0.lib"):
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/OpenEXR-3_0.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread-3_0.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Imath-3_0.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex-3_0.lib")
|
|
|
+ elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/OpenEXR.lib"):
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/OpenEXR.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Imath.lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex.lib")
|
|
|
else:
|
|
|
- LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half" + suffix + ".lib")
|
|
|
+ suffix = ""
|
|
|
+ if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_2.lib"):
|
|
|
+ suffix = "-2_2"
|
|
|
+ elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_3.lib"):
|
|
|
+ suffix = "-2_3"
|
|
|
+ elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_4.lib"):
|
|
|
+ suffix = "-2_4"
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Imath" + suffix + ".lib")
|
|
|
+ if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + "_s.lib"):
|
|
|
+ suffix += "_s" # _s suffix observed for OpenEXR 2.3 only so far
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + ".lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread" + suffix + ".lib")
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex" + suffix + ".lib")
|
|
|
+ if suffix == "-2_2":
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half.lib")
|
|
|
+ else:
|
|
|
+ LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half" + suffix + ".lib")
|
|
|
IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/OpenEXR")
|
|
|
IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/Imath")
|
|
|
if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/jpeg-static.lib")
|
|
|
@@ -876,7 +897,6 @@ if (COMPILER=="GCC"):
|
|
|
SmartPkgEnable("OPENAL", "openal", ("openal"), "AL/al.h", framework = "OpenAL")
|
|
|
SmartPkgEnable("SQUISH", "", ("squish"), "squish.h")
|
|
|
SmartPkgEnable("TIFF", "libtiff-4", ("tiff"), "tiff.h")
|
|
|
- SmartPkgEnable("OPENEXR", "OpenEXR", ("IlmImf", "Imath", "Half", "Iex", "IexMath", "IlmThread"), ("OpenEXR", "Imath", "OpenEXR/ImfOutputFile.h"))
|
|
|
SmartPkgEnable("VRPN", "", ("vrpn", "quat"), ("vrpn", "quat.h", "vrpn/vrpn_Types.h"))
|
|
|
SmartPkgEnable("BULLET", "bullet", ("BulletSoftBody", "BulletDynamics", "BulletCollision", "LinearMath"), ("bullet", "bullet/btBulletDynamicsCommon.h"))
|
|
|
SmartPkgEnable("VORBIS", "vorbisfile",("vorbisfile", "vorbis", "ogg"), ("ogg/ogg.h", "vorbis/vorbisfile.h"))
|
|
|
@@ -906,6 +926,23 @@ if (COMPILER=="GCC"):
|
|
|
for ffmpeg_lib in ffmpeg_libs:
|
|
|
LibName("FFMPEG", "-Wl,--exclude-libs,%s.a" % (ffmpeg_lib))
|
|
|
|
|
|
+ if not PkgSkip("OPENEXR"):
|
|
|
+ # OpenEXR libraries have different names depending on the version.
|
|
|
+ openexr_libdir = os.path.join(GetThirdpartyDir(), "openexr", "lib")
|
|
|
+ openexr_incs = ("OpenEXR", "Imath", "OpenEXR/ImfOutputFile.h")
|
|
|
+ if os.path.isfile(os.path.join(openexr_libdir, "libOpenEXR-3_1.a")):
|
|
|
+ SmartPkgEnable("OPENEXR", "", ("OpenEXR-3_1", "IlmThread-3_1", "Imath-3_1", "Iex-3_1"), openexr_incs)
|
|
|
+ if os.path.isfile(os.path.join(openexr_libdir, "libOpenEXR-3_0.a")):
|
|
|
+ SmartPkgEnable("OPENEXR", "", ("OpenEXR-3_0", "IlmThread-3_0", "Imath-3_0", "Iex-3_0"), openexr_incs)
|
|
|
+ elif os.path.isfile(os.path.join(openexr_libdir, "libOpenEXR.a")):
|
|
|
+ SmartPkgEnable("OPENEXR", "", ("OpenEXR", "IlmThread", "Imath", "Iex"), openexr_incs)
|
|
|
+ elif os.path.isfile(os.path.join(openexr_libdir, "libIlmImf.a")):
|
|
|
+ SmartPkgEnable("OPENEXR", "", ("IlmImf", "Imath", "Half", "Iex", "IexMath", "IlmThread"), openexr_incs)
|
|
|
+ else:
|
|
|
+ # Find it in the system, preferably using pkg-config, otherwise
|
|
|
+ # using the OpenEXR 3 naming scheme.
|
|
|
+ SmartPkgEnable("OPENEXR", "OpenEXR", ("OpenEXR", "IlmThread", "Imath", "Iex"), openexr_incs)
|
|
|
+
|
|
|
if GetTarget() != "darwin":
|
|
|
for fcollada_lib in fcollada_libs:
|
|
|
LibName("FCOLLADA", "-Wl,--exclude-libs,lib%s.a" % (fcollada_lib))
|
|
|
@@ -937,6 +974,9 @@ if (COMPILER=="GCC"):
|
|
|
LibName("OPENEXR", "-Wl,--exclude-libs,libIlmImfUtil.a")
|
|
|
LibName("OPENEXR", "-Wl,--exclude-libs,libIlmThread.a")
|
|
|
LibName("OPENEXR", "-Wl,--exclude-libs,libImath.a")
|
|
|
+ LibName("OPENEXR", "-Wl,--exclude-libs,libOpenEXR.a")
|
|
|
+ LibName("OPENEXR", "-Wl,--exclude-libs,libOpenEXRCore.a")
|
|
|
+ LibName("OPENEXR", "-Wl,--exclude-libs,libOpenEXRUtil.a")
|
|
|
|
|
|
if not PkgSkip("VORBIS"):
|
|
|
LibName("VORBIS", "-Wl,--exclude-libs,libogg.a")
|
|
|
@@ -1074,8 +1114,6 @@ if (COMPILER=="GCC"):
|
|
|
LibName("FFMPEG", "-undefined dynamic_lookup")
|
|
|
if not PkgSkip("ASSIMP"):
|
|
|
LibName("ASSIMP", "-undefined dynamic_lookup")
|
|
|
- if not PkgSkip("OPENEXR"):
|
|
|
- LibName("OPENEXR", "-undefined dynamic_lookup")
|
|
|
if not PkgSkip("VRPN"):
|
|
|
LibName("VRPN", "-undefined dynamic_lookup")
|
|
|
|
|
|
@@ -1216,7 +1254,7 @@ def CompileCxx(obj,src,opts):
|
|
|
cmd = "cl "
|
|
|
if GetTargetArch() == 'x64':
|
|
|
cmd += "/favor:blend "
|
|
|
- cmd += "/wd4996 /wd4275 /wd4273 "
|
|
|
+ cmd += "/wd4996 "
|
|
|
|
|
|
# Set the minimum version to Windows Vista.
|
|
|
cmd += "/DWINVER=0x600 "
|
|
|
@@ -1248,7 +1286,7 @@ def CompileCxx(obj,src,opts):
|
|
|
if (building):
|
|
|
cmd += " /DBUILDING_" + building
|
|
|
|
|
|
- if ("BIGOBJ" in opts) or GetTargetArch() == 'x64':
|
|
|
+ if ("BIGOBJ" in opts) or GetTargetArch() == 'x64' or not PkgSkip("EIGEN"):
|
|
|
cmd += " /bigobj"
|
|
|
|
|
|
cmd += " /Zm300"
|
|
|
@@ -1266,7 +1304,7 @@ def CompileCxx(obj,src,opts):
|
|
|
cmd = "icl "
|
|
|
if GetTargetArch() == 'x64':
|
|
|
cmd += "/favor:blend "
|
|
|
- cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 "
|
|
|
+ cmd += "/wd4996 /wd4267 /wd4101 "
|
|
|
cmd += "/DWINVER=0x600 "
|
|
|
cmd += "/Fo" + obj + " /c"
|
|
|
for x in ipath: cmd += " /I" + x
|
|
|
@@ -1377,6 +1415,10 @@ def CompileCxx(obj,src,opts):
|
|
|
if 'NOARCH:' + arch.upper() not in opts:
|
|
|
cmd += " -arch %s" % arch
|
|
|
|
|
|
+ elif 'clang' not in GetCXX().split('/')[-1]:
|
|
|
+ # Enable interprocedural optimizations in GCC.
|
|
|
+ cmd += " -fno-semantic-interposition"
|
|
|
+
|
|
|
if "SYSROOT" in SDK:
|
|
|
if GetTarget() != "android":
|
|
|
cmd += ' --sysroot=%s' % (SDK["SYSROOT"])
|
|
|
@@ -1463,10 +1505,7 @@ def CompileCxx(obj,src,opts):
|
|
|
if (optlevel==4): cmd += " -O3 -DNDEBUG"
|
|
|
|
|
|
# Enable more warnings.
|
|
|
- cmd += " -Wall -Wno-unused-function"
|
|
|
-
|
|
|
- if not src.endswith(".c"):
|
|
|
- cmd += " -Wno-reorder"
|
|
|
+ cmd += " -Wall -Wno-unused-function -Werror=return-type"
|
|
|
|
|
|
# Ignore unused variables in NDEBUG builds, often used in asserts.
|
|
|
if optlevel == 4:
|
|
|
@@ -5036,8 +5075,10 @@ if GetTarget() == 'android' and not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
|
|
# DIRECTORY: panda/src/tinydisplay/
|
|
|
#
|
|
|
|
|
|
-if (GetTarget() in ('windows', 'darwin') or not PkgSkip("X11")) and not PkgSkip("TINYDISPLAY"):
|
|
|
+if not PkgSkip("TINYDISPLAY"):
|
|
|
OPTS=['DIR:panda/src/tinydisplay', 'BUILDING:TINYDISPLAY', 'X11']
|
|
|
+ if not PkgSkip("X11"):
|
|
|
+ OPTS += ['X11']
|
|
|
TargetAdd('p3tinydisplay_composite1.obj', opts=OPTS, input='p3tinydisplay_composite1.cxx')
|
|
|
TargetAdd('p3tinydisplay_composite2.obj', opts=OPTS, input='p3tinydisplay_composite2.cxx')
|
|
|
TargetAdd('p3tinydisplay_ztriangle_1.obj', opts=OPTS, input='ztriangle_1.cxx')
|
|
|
@@ -5048,7 +5089,7 @@ if (GetTarget() in ('windows', 'darwin') or not PkgSkip("X11")) and not PkgSkip(
|
|
|
if GetTarget() == 'windows':
|
|
|
TargetAdd('libp3tinydisplay.dll', input='libp3windisplay.dll')
|
|
|
TargetAdd('libp3tinydisplay.dll', opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM'])
|
|
|
- elif GetTarget() != 'darwin':
|
|
|
+ elif GetTarget() != 'darwin' and not PkgSkip("X11"):
|
|
|
TargetAdd('libp3tinydisplay.dll', input='p3x11display_composite1.obj')
|
|
|
TargetAdd('libp3tinydisplay.dll', opts=['X11'])
|
|
|
TargetAdd('libp3tinydisplay.dll', input='p3tinydisplay_composite1.obj')
|
|
|
@@ -6057,17 +6098,21 @@ for VER in MAYAVERSIONS:
|
|
|
TargetAdd('egg2maya'+VNUM+'.exe', opts=['ADVAPI']+ARCH_OPTS)
|
|
|
|
|
|
if MAYA_BUILT:
|
|
|
+ OPTS=['DIR:pandatool/src/mayaprogs', 'DIR:pandatool/src/maya', 'DIR:pandatool/src/mayaegg', 'BUILDING:MISC', 'NOARCH:ARM64']
|
|
|
+
|
|
|
TargetAdd('mayaprogs_mayaConversionClient.obj', opts=OPTS, input='mayaConversionClient.cxx')
|
|
|
|
|
|
TargetAdd('maya2egg_mayaToEggClient.obj', opts=OPTS, input='mayaToEggClient.cxx')
|
|
|
TargetAdd('maya2egg_client.exe', input='mayaprogs_mayaConversionClient.obj')
|
|
|
TargetAdd('maya2egg_client.exe', input='maya2egg_mayaToEggClient.obj')
|
|
|
TargetAdd('maya2egg_client.exe', input=COMMON_EGG2X_LIBS)
|
|
|
+ TargetAdd('maya2egg_client.exe', opts=['NOARCH:ARM64'])
|
|
|
|
|
|
TargetAdd('egg2maya_eggToMayaClient.obj', opts=OPTS, input='eggToMayaClient.cxx')
|
|
|
TargetAdd('egg2maya_client.exe', input='mayaprogs_mayaConversionClient.obj')
|
|
|
TargetAdd('egg2maya_client.exe', input='egg2maya_eggToMayaClient.obj')
|
|
|
TargetAdd('egg2maya_client.exe', input=COMMON_EGG2X_LIBS)
|
|
|
+ TargetAdd('egg2maya_client.exe', opts=['NOARCH:ARM64'])
|
|
|
|
|
|
#
|
|
|
# DIRECTORY: contrib/src/ai/
|
|
|
@@ -6125,7 +6170,7 @@ if PkgSkip("PYTHON") == 0:
|
|
|
|
|
|
if GetTarget() == 'linux' or GetTarget() == 'freebsd':
|
|
|
# Setup rpath so libs can be found in the same directory as the deployed game
|
|
|
- LibName('DEPLOYSTUB', "-Wl,-rpath,\\$ORIGIN")
|
|
|
+ LibName('DEPLOYSTUB', "-Wl,--disable-new-dtags,-rpath,\\$ORIGIN")
|
|
|
LibName('DEPLOYSTUB', "-Wl,-z,origin")
|
|
|
LibName('DEPLOYSTUB', "-rdynamic")
|
|
|
|
|
|
@@ -6145,6 +6190,9 @@ if PkgSkip("PYTHON") == 0:
|
|
|
PyTargetAdd('deploy-stubw.exe', input='deploy-stubw.obj')
|
|
|
PyTargetAdd('deploy-stubw.exe', opts=['MACOS_APP_BUNDLE', 'DEPLOYSTUB', 'NOICON'])
|
|
|
elif GetTarget() == 'android':
|
|
|
+ TargetAdd('org/jnius/NativeInvocationHandler.class', opts=OPTS, input='NativeInvocationHandler.java')
|
|
|
+ TargetAdd('classes.dex', input='org/jnius/NativeInvocationHandler.class')
|
|
|
+
|
|
|
PyTargetAdd('deploy-stubw_android_main.obj', opts=OPTS, input='android_main.cxx')
|
|
|
PyTargetAdd('deploy-stubw_android_log.obj', opts=OPTS, input='android_log.c')
|
|
|
PyTargetAdd('libdeploy-stubw.dll', input='android_native_app_glue.obj')
|
|
|
@@ -6273,6 +6321,8 @@ def ParallelMake(tasklist):
|
|
|
tasklist = extras
|
|
|
sys.stdout.flush()
|
|
|
if tasksqueued == 0:
|
|
|
+ if len(tasklist) > 0:
|
|
|
+ continue
|
|
|
break
|
|
|
donetask = donequeue.get()
|
|
|
if donetask == 0:
|