mirror of
https://github.com/godotengine/gdnative-demos.git
synced 2026-01-03 14:09:44 +03:00
Add Windows support to C demos (simple and instance_binding)
GLFW doesn't seem to work
This commit is contained in:
@@ -38,7 +38,7 @@ if env["platform"] == "":
|
||||
print("No valid target platform selected.")
|
||||
quit()
|
||||
|
||||
env["target_path"] += env["platform"] + "/"
|
||||
platform = env["platform"]
|
||||
|
||||
# Process other arguments.
|
||||
if env["use_llvm"]:
|
||||
@@ -76,9 +76,17 @@ elif env["platform"] == "windows":
|
||||
# Make sure our library includes the Godot headers.
|
||||
env.Append(CPPPATH=[".", godot_headers_path])
|
||||
|
||||
env["target_path"] += platform + "/"
|
||||
|
||||
# Make sure our library looks in the target path for any other
|
||||
# libraries it may need. The path needs to be project-relative.
|
||||
env.Append(LINKFLAGS=["-Wl,-rpath,gdnative/" + env["platform"]])
|
||||
# We remove "project/" from the target path with "[8:]".
|
||||
if platform == "windows":
|
||||
env.Append(LINKFLAGS=["-LIBPATH:" + env["target_path"]])
|
||||
else:
|
||||
env.Append(LINKFLAGS=["-Wl,-rpath," + (env["target_path"])[8:]])
|
||||
# The capital L path is used when compiling, so it includes "project/".
|
||||
env.Append(LINKFLAGS=["-L" + env["target_path"]])
|
||||
|
||||
# Tweak this if you want to use different folders,
|
||||
# or more folders, to store your source code in.
|
||||
|
||||
Reference in New Issue
Block a user