Skip to content

Commit df9164b

Browse files
committed
Added TYPED_METHOD_BIND and c++17 flags to windows build and moved test project files
1 parent f3dea4b commit df9164b

File tree

10 files changed

+9
-4
lines changed

10 files changed

+9
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ bin
2323
*.creator.user
2424
*.files
2525
*.includes
26+
*.idb
2627

2728
# Gprof output
2829
gmon.out

SConstruct

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ elif env["platform"] == "ios":
256256
elif env["platform"] == "windows":
257257
if host_platform == "windows" and not env["use_mingw"]:
258258
# MSVC
259+
env.Append(CPPDEFINES=["TYPED_METHOD_BIND"])
259260
env.Append(LINKFLAGS=["/WX"])
260261
if env["target"] == "debug":
261262
env.Append(CCFLAGS=["/Z7", "/Od", "/EHsc", "/D_DEBUG", "/MDd"])

test/SConstruct

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ opts.Add(
2525
)
2626
opts.Add(EnumVariable("bits", "Target platform bits", "64", ("32", "64")))
2727
opts.Add(BoolVariable("use_llvm", "Use the LLVM / Clang compiler", "no"))
28-
opts.Add(PathVariable("target_path", "The path where the lib is installed.", "bin/", PathVariable.PathAccept))
28+
opts.Add(PathVariable("target_path", "The path where the lib is installed.", "demo/bin/", PathVariable.PathAccept))
2929
opts.Add(PathVariable("target_name", "The library name.", "libgdexample", PathVariable.PathAccept))
3030

3131
# Local dependency paths, adapt them to your setup
@@ -106,14 +106,18 @@ elif env["platform"] == "windows":
106106

107107
env.Append(CPPDEFINES=["WIN32", "_WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS"])
108108
env.Append(CCFLAGS=["-W3", "-GR"])
109+
env.Append(CXXFLAGS=["-std:c++17"])
109110
if env["target"] in ("debug", "d"):
110111
env.Append(CPPDEFINES=["_DEBUG"])
111-
env.Append(CCFLAGS=["-EHsc", "-MDd", "-ZI"])
112+
env.Append(CCFLAGS=["-EHsc", "-MDd", "-ZI", "-FS"])
112113
env.Append(LINKFLAGS=["-DEBUG"])
113114
else:
114115
env.Append(CPPDEFINES=["NDEBUG"])
115116
env.Append(CCFLAGS=["-O2", "-EHsc", "-MD"])
116117

118+
if not(env["use_llvm"]):
119+
env.Append(CPPDEFINES=["TYPED_METHOD_BIND"])
120+
117121
if env["target"] in ("debug", "d"):
118122
cpp_library += ".debug"
119123
else:
File renamed without changes.

test/example.gdextension renamed to test/demo/example.gdextension

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ entry_symbol = "example_library_init"
55
[libraries]
66

77
Linux.64 = "bin/x11/libgdexample.so"
8+
Windows.64 = "bin/win64/libgdexample.dll"
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/main.tscn renamed to test/demo/main.tscn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
script = ExtResource( "1_c326s" )
77

88
[node name="Example" type="Example" parent="."]
9-
offset_right = 40.0
10-
offset_bottom = 40.0
119
script = null
1210
__meta__ = {
1311
"_edit_use_anchors_": false
File renamed without changes.

0 commit comments

Comments
 (0)