Skip to content

Commit 3ab9d03

Browse files
authored
Merge pull request #199 from Faless/build/openssl_and_cmake
Use OpenSSL on windows too, build libgit2, ssh2 with cmake.
2 parents ef24a36 + 0d0c307 commit 3ab9d03

12 files changed

Lines changed: 265 additions & 259 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
python-version: "3.x"
4747
architecture: "x64"
4848
- uses: ilammy/msvc-dev-cmd@v1
49+
- uses: ilammy/setup-nasm@v1
4950
- name: build-windows-editor-x64
5051
run: |
5152
pip3 install --user scons

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
path = godot-cpp
33
url = https://github.com/godotengine/godot-cpp
44
branch = 3.x
5-
[submodule "libgit2"]
5+
[submodule "thirdparty/git2/libgit2"]
66
path = thirdparty/git2/libgit2
77
url = https://github.com/libgit2/libgit2
88
ignore = untracked

SConstruct

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,26 @@ if ARGUMENTS.get("custom_api_file", "") != "":
2323

2424
ARGUMENTS["target"] = "editor"
2525
env = SConscript("godot-cpp/SConstruct").Clone()
26+
env.PrependENVPath("PATH", os.getenv("PATH")) # Prepend PATH, done upstream in recent godot-cpp verions.
2627

2728
# OpenSSL Builder
2829
env.Tool("openssl", toolpath=["tools"])
2930

31+
# SSH2 Builder
32+
env.Tool("cmake", toolpath=["tools"])
33+
env.Tool("ssh2", toolpath=["tools"])
34+
env.Tool("git2", toolpath=["tools"])
35+
3036
opts.Update(env)
3137

32-
if env["platform"] != "windows": # Windows does not need OpenSSL
33-
ssl = env.OpenSSL()
34-
else:
35-
ssl = []
38+
ssl = env.OpenSSL()
39+
ssh2 = env.BuildSSH2(ssl)
40+
ssl += ssh2
41+
git2 = env.BuildGIT2(ssl)
3642

3743
Export("ssl")
3844
Export("env")
3945

40-
SConscript("thirdparty/SCsub")
41-
4246
SConscript("godot-git-plugin/SCsub")
4347

4448
# Generates help for the -h scons option.

godot-git-plugin/SCsub

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ elif env["platform"] == "windows":
4343

4444
env.Append(CPPPATH=[".", "src/"])
4545

46-
env.Append(CPPPATH=["../thirdparty/git2/libgit2/include/"])
47-
env.Append(LIBPATH=["../thirdparty/bin/"])
48-
env.Prepend(LIBS=["git2", "ssh2"])
46+
env.Append(CPPPATH=["#thirdparty/git2/libgit2/include/"])
4947

5048
lib_sources = Glob("src/*.cpp")
5149
env.Depends(lib_sources, ssl)

thirdparty/SCsub

Lines changed: 0 additions & 6 deletions
This file was deleted.

thirdparty/git2/SCsub

Lines changed: 0 additions & 131 deletions
This file was deleted.

thirdparty/git2/libgit2

Submodule libgit2 updated 1695 files

thirdparty/ssh2/SCsub

Lines changed: 0 additions & 110 deletions
This file was deleted.

thirdparty/ssh2/libssh2

Submodule libssh2 updated 440 files

0 commit comments

Comments
 (0)