From bf7650bf1d51df480b7088eb32ee97d717f0a8f0 Mon Sep 17 00:00:00 2001 From: Ed94 Date: Thu, 12 May 2022 10:30:48 -0400 Subject: [PATCH] cursed --- Source/SConstruct | 30 ++++++++++++++++++++---------- Source/gdexample.h | 2 +- Source/gdlibrary.h | 2 ++ Source/vc140.idb | Bin 11264 -> 11264 bytes Source/vc140.pdb | Bin 82944 -> 79872 bytes 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Source/SConstruct b/Source/SConstruct index c056334..b849a34 100644 --- a/Source/SConstruct +++ b/Source/SConstruct @@ -1,5 +1,6 @@ #!python import os +import glob opts = Variables([], ARGUMENTS) @@ -14,16 +15,16 @@ opts.Add(EnumVariable('target', "Compilation target", 'debug', ['d', 'debug', 'r opts.Add(EnumVariable('platform', "Compilation platform", '', ['', 'windows', 'x11', 'linux', 'osx'])) opts.Add(EnumVariable('p', "Compilation target, alias for 'platform'", '', ['', 'windows', 'x11', 'linux', 'osx'])) opts.Add(BoolVariable('use_llvm', "Use the LLVM / Clang compiler", 'no')) -opts.Add(PathVariable('target_path', 'The path where the lib is installed.', ProjPath + '/Engine/gdnative_cpp/bin')) +opts.Add(PathVariable('target_path', 'The path where the lib is installed.', ProjPath + '/Engine/gdnative_cpp/bin/')) opts.Add(PathVariable('target_name', 'The library name.', 'libgdexample', PathVariable.PathAccept)) # Local dependency paths, adapt them to your setup -godot_headers_path = ProjPath + "/Engine/gdnative_cpp/godot_cpp/godot-headers/" -cpp_bindings_path = ProjPath + "/Engine/gdnative_cpp/godot_cpp/" +godot_headers_path = ProjPath + "/Engine/gdnative_cpp/godot-headers/" +cpp_bindings_path = ProjPath + "/Engine/gdnative_cpp/" cpp_library = "libgodot-cpp" -GDNative_Src = ProjPath + '/Engine/gdnative_cpp/godot_cpp/src/*.cpp' -Src = ProjPath + "/Source/*.cpp" +GDNative_Src = ProjPath + '/Engine/gdnative_cpp/src/' +Src = ProjPath + "/Source/" # only support 64 at this time.. bits = 64 @@ -99,16 +100,25 @@ else: cpp_library += '.' + str(bits) # make sure our binding library is properly includes -env.Append(CPPPATH=['.', godot_headers_path, cpp_bindings_path + 'include/', cpp_bindings_path + 'include/core/', cpp_bindings_path + 'include/gen/']) -env.Append(LIBPATH=[cpp_bindings_path + 'bin/']) +env.Append(CPPPATH=[ + '.', + godot_headers_path, + cpp_bindings_path + 'include/', + cpp_bindings_path + 'include/core/', + cpp_bindings_path + 'include/gen/']) + +env.Append(LIBPATH=[cpp_bindings_path + "/bin"]) + env.Append(LIBS=[cpp_library]) # tweak this if you want to use different folders, or more folders, to store your source code in. env.Append(CPPPATH=[GDNative_Src]) env.Append(CPPPATH=[Src]) -sources = Glob(GDNative_Src, Src) -test = "Sources: ".join(sources) -print(test); + +sources = Glob(GDNative_Src + '/*.cpp') + Glob(Src + '/*cpp') + +for thing in sources : + print(thing) library = env.SharedLibrary(target=env['target_path'] + env['target_name'] , source=sources) diff --git a/Source/gdexample.h b/Source/gdexample.h index a7a5d3d..48ef8a4 100644 --- a/Source/gdexample.h +++ b/Source/gdexample.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include namespace godot { diff --git a/Source/gdlibrary.h b/Source/gdlibrary.h index a6f13e1..9cbd644 100644 --- a/Source/gdlibrary.h +++ b/Source/gdlibrary.h @@ -1,3 +1,5 @@ +#pragma once + #include "gdexample.h" #define gd_export(Type_) \ diff --git a/Source/vc140.idb b/Source/vc140.idb index 78d3ebd2c07d7f80ef4f0e3ede0dc44fcbe42dac..b547d80a65f675cbce76919ef8dd190199c46d79 100644 GIT binary patch literal 11264 zcmeHN&5ImG6z`3i#MPWl_B5bKLa^F{O~KRtJMv`6T{3XYN}AgZ5a!e z7wsVS6WJFH-t97@IcuvxB`&TWw5e*|aCWY+Hw&x#snypqt9fC|s*HKq3q;oGbO>4Z zJF9j-ZT4J8_<_(SQ^&@glyM?-%jd%F_#7T+gl5JP#%7ah))e1c7MT(8QG%&^SXCi^fa9zBD~QteB)1NX2Sit;V>DqFyYM z5$ki7C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