-
-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added crosscompiling for linux-windows; Added makefile #99
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! Looking good, but the generate_bindings option should be configurable in the makefile.
Makefile
Outdated
TARGET = debug | ||
NAME = godot-cpp | ||
|
||
BASE = scons n=$(NAME) generate_bindings=yes target=$(TARGET) headers=$(HEADERS) godotbinpath=$(GODOT_BIN_PATH) -j4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes it's desirable to not re-generate the bindings, maybe this can be a flag too?
Talking about this, it might be good to change the way the bindings are generated so Scons is more aware of them when recompiling. I'll open an issue for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've seen that todo in scons.
Shouldn't generate_bindings be yes
by default? Modules won't work without bindings, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could check if there's no bindings - generate them. And replace flag generate_bidings
with regenerate_bidings
so you can force it to regenerate them.
SConstruct
Outdated
|
||
env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core']) | ||
if host_platform == 'Windows': | ||
result_name += '.dll' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the resulting library be a .lib
file for windows and then even when compiling from any host platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't have windows so I just guessed that. If you compile on linux .a
s works ok for any platform.
…flag; Updated readme
SConstruct
Outdated
if platform == "osx": | ||
env.Append(CCFLAGS = ['-g','-O3', '-std=c++14', '-arch', 'x86_64']) | ||
env.Append(LINKFLAGS = ['-arch', 'x86_64', '-framework', 'Cocoa', '-Wl,-undefined,dynamic_lookup']) | ||
env['CXX']='gcc-5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this make the use_llvm=yes
option be ignored?
Hola!
PRs for examples are coming tomorrow.
Best 😃