Skip to content
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

Merged
merged 4 commits into from
Feb 25, 2018
Merged

Added crosscompiling for linux-windows; Added makefile #99

merged 4 commits into from
Feb 25, 2018

Conversation

quentincaffeino
Copy link
Contributor

@quentincaffeino quentincaffeino commented Feb 22, 2018

Hola!

PRs for examples are coming tomorrow.

Best 😃

Copy link
Contributor

@karroffel karroffel left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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'
Copy link
Contributor

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?

Copy link
Contributor Author

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 .as works ok for any platform.

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'
Copy link
Contributor

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?

@karroffel karroffel merged commit 3820c05 into godotengine:master Feb 25, 2018
@quentincaffeino quentincaffeino deleted the crosscompiling branch February 25, 2018 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants