Added TYPED_METHOD_BIND and c++17 flags to windows build and moved test project files

pull/602/head
Bastiaan Olij 2021-08-21 21:50:22 +10:00
parent f3dea4b752
commit df9164b9bd
10 changed files with 9 additions and 4 deletions

1
.gitignore vendored
View File

@ -23,6 +23,7 @@ bin
*.creator.user *.creator.user
*.files *.files
*.includes *.includes
*.idb
# Gprof output # Gprof output
gmon.out gmon.out

View File

@ -256,6 +256,7 @@ elif env["platform"] == "ios":
elif env["platform"] == "windows": elif env["platform"] == "windows":
if host_platform == "windows" and not env["use_mingw"]: if host_platform == "windows" and not env["use_mingw"]:
# MSVC # MSVC
env.Append(CPPDEFINES=["TYPED_METHOD_BIND"])
env.Append(LINKFLAGS=["/WX"]) env.Append(LINKFLAGS=["/WX"])
if env["target"] == "debug": if env["target"] == "debug":
env.Append(CCFLAGS=["/Z7", "/Od", "/EHsc", "/D_DEBUG", "/MDd"]) env.Append(CCFLAGS=["/Z7", "/Od", "/EHsc", "/D_DEBUG", "/MDd"])

View File

@ -25,7 +25,7 @@ opts.Add(
) )
opts.Add(EnumVariable("bits", "Target platform bits", "64", ("32", "64"))) opts.Add(EnumVariable("bits", "Target platform bits", "64", ("32", "64")))
opts.Add(BoolVariable("use_llvm", "Use the LLVM / Clang compiler", "no")) opts.Add(BoolVariable("use_llvm", "Use the LLVM / Clang compiler", "no"))
opts.Add(PathVariable("target_path", "The path where the lib is installed.", "bin/", PathVariable.PathAccept)) opts.Add(PathVariable("target_path", "The path where the lib is installed.", "demo/bin/", PathVariable.PathAccept))
opts.Add(PathVariable("target_name", "The library name.", "libgdexample", PathVariable.PathAccept)) opts.Add(PathVariable("target_name", "The library name.", "libgdexample", PathVariable.PathAccept))
# Local dependency paths, adapt them to your setup # Local dependency paths, adapt them to your setup
@ -106,14 +106,18 @@ elif env["platform"] == "windows":
env.Append(CPPDEFINES=["WIN32", "_WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS"]) env.Append(CPPDEFINES=["WIN32", "_WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS"])
env.Append(CCFLAGS=["-W3", "-GR"]) env.Append(CCFLAGS=["-W3", "-GR"])
env.Append(CXXFLAGS=["-std:c++17"])
if env["target"] in ("debug", "d"): if env["target"] in ("debug", "d"):
env.Append(CPPDEFINES=["_DEBUG"]) env.Append(CPPDEFINES=["_DEBUG"])
env.Append(CCFLAGS=["-EHsc", "-MDd", "-ZI"]) env.Append(CCFLAGS=["-EHsc", "-MDd", "-ZI", "-FS"])
env.Append(LINKFLAGS=["-DEBUG"]) env.Append(LINKFLAGS=["-DEBUG"])
else: else:
env.Append(CPPDEFINES=["NDEBUG"]) env.Append(CPPDEFINES=["NDEBUG"])
env.Append(CCFLAGS=["-O2", "-EHsc", "-MD"]) env.Append(CCFLAGS=["-O2", "-EHsc", "-MD"])
if not(env["use_llvm"]):
env.Append(CPPDEFINES=["TYPED_METHOD_BIND"])
if env["target"] in ("debug", "d"): if env["target"] in ("debug", "d"):
cpp_library += ".debug" cpp_library += ".debug"
else: else:

View File

@ -5,3 +5,4 @@ entry_symbol = "example_library_init"
[libraries] [libraries]
Linux.64 = "bin/x11/libgdexample.so" Linux.64 = "bin/x11/libgdexample.so"
Windows.64 = "bin/win64/libgdexample.dll"

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -6,8 +6,6 @@
script = ExtResource( "1_c326s" ) script = ExtResource( "1_c326s" )
[node name="Example" type="Example" parent="."] [node name="Example" type="Example" parent="."]
offset_right = 40.0
offset_bottom = 40.0
script = null script = null
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false