-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSConstruct
More file actions
42 lines (35 loc) · 1.31 KB
/
Copy pathSConstruct
File metadata and controls
42 lines (35 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
import os
import sys
env = SConscript("submodules/godot-cpp/SConstruct")
# For reference:
# - CCFLAGS are compilation flags shared between C and C++
# - CFLAGS are for C-specific compilation flags
# - CXXFLAGS are for C++-specific compilation flags
# - CPPFLAGS are for pre-processor flags
# - CPPDEFINES are for pre-processor defines
# - LINKFLAGS are for linking flags
env.Append(CPPPATH=["src/", "submodules/SAV1/include", "submodules/SAV1/subprojects/dav1d/include"])
env.Append(LIBPATH=["submodules/SAV1/builddir", "submodules/SAV1/builddir/subprojects/opus/src", "submodules/SAV1/builddir/subprojects/dav1d/src"])
env.Append(LIBS=["sav1", "dav1d", "opus"])
print("MSVC_VERSION:", env.get('MSVC_VERSION'))
if env.get('MSVC_VERSION'):
env.Append(LIBS=["winmm"])
sources = [
"src/register_types.cpp",
"src/video_player.cpp",
"src/video_player_soft.cpp"
]
if env["platform"] == "macos":
library = env.SharedLibrary(
"demo/addons/video_toolkit/bin/libvtg.{}.{}.framework/libvtg.{}.{}".format(
env["platform"], env["target"], env["platform"], env["target"]
),
source=sources
)
else:
library = env.SharedLibrary(
"demo/addons/video_toolkit/bin/libvtg{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
source=sources,
)
Default(library)