mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Tweaks for building with static thirdparty libs on Linux
Sneak in a function used by makewheel
This commit is contained in:
parent
056ea94765
commit
601b6b8678
@ -561,6 +561,10 @@ if (COMPILER == "MSVC"):
|
||||
LibName(pkg, 'dxerrVNUM.lib'.replace("VNUM", vnum))
|
||||
#LibName(pkg, 'ddraw.lib')
|
||||
LibName(pkg, 'dxguid.lib')
|
||||
|
||||
if not PkgSkip("FREETYPE") and os.path.isdir(GetThirdpartyDir() + "freetype/include/freetype2"):
|
||||
IncDirectory("FREETYPE", GetThirdpartyDir() + "freetype/include/freetype2")
|
||||
|
||||
IncDirectory("ALWAYS", GetThirdpartyDir() + "extras/include")
|
||||
LibName("WINSOCK", "wsock32.lib")
|
||||
LibName("WINSOCK2", "wsock32.lib")
|
||||
@ -766,9 +770,13 @@ if (COMPILER=="GCC"):
|
||||
SmartPkgEnable("JPEG", "", ("jpeg"), "jpeglib.h")
|
||||
SmartPkgEnable("PNG", "libpng", ("png"), "png.h", tool = "libpng-config")
|
||||
|
||||
if GetTarget() == "darwin" and not PkgSkip("FFMPEG"):
|
||||
LibName("FFMPEG", "-Wl,-read_only_relocs,suppress")
|
||||
LibName("FFMPEG", "-framework VideoDecodeAcceleration")
|
||||
if not PkgSkip("FFMPEG"):
|
||||
if GetTarget() == "darwin":
|
||||
LibName("FFMPEG", "-Wl,-read_only_relocs,suppress")
|
||||
LibName("FFMPEG", "-framework VideoDecodeAcceleration")
|
||||
elif os.path.isfile(GetThirdpartyDir() + "ffmpeg/lib/libavcodec.a"):
|
||||
# Needed when linking ffmpeg statically on Linux.
|
||||
LibName("FFMPEG", "-Wl,-Bsymbolic")
|
||||
|
||||
cv_lib = ChooseLib(("opencv_core", "cv"), "OPENCV")
|
||||
if cv_lib == "opencv_core":
|
||||
|
@ -1491,6 +1491,11 @@ def SmartPkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None,
|
||||
if os.path.isdir(os.path.join(pkg_dir, "include")):
|
||||
IncDirectory(target_pkg, os.path.join(pkg_dir, "include"))
|
||||
|
||||
# Handle cases like freetype2 where the include dir is a subdir under "include"
|
||||
for i in incs:
|
||||
if os.path.isdir(os.path.join(pkg_dir, "include", i)):
|
||||
IncDirectory(target_pkg, os.path.join(pkg_dir, "include", i))
|
||||
|
||||
if os.path.isdir(os.path.join(pkg_dir, "lib")):
|
||||
LibDirectory(target_pkg, os.path.join(pkg_dir, "lib"))
|
||||
|
||||
@ -2749,6 +2754,13 @@ def GetOrigExt(x):
|
||||
def SetOrigExt(x, v):
|
||||
ORIG_EXT[x] = v
|
||||
|
||||
def GetExtensionSuffix():
|
||||
target = GetTarget()
|
||||
if target == 'windows':
|
||||
return '.pyd'
|
||||
else:
|
||||
return '.so'
|
||||
|
||||
def CalcLocation(fn, ipath):
|
||||
if (fn.count("/")): return fn
|
||||
dllext = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user