Skip to content

Commit 0ffafd1

Browse files
committed
Restructure and cleanup
xcframework generation. added armv7 to scons clean up Update README.md switch to godot's source submodule move plugins to separate folder move scripts. added static library script fix config
1 parent 34ce735 commit 0ffafd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+129
-128
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "godot"]
2+
path = godot
3+
url = https://github.com/godotengine/godot

LICENCE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Godot Engine
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 0 deletions

SConstruct

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ env.Prepend(CXXFLAGS=[
9494
])
9595
env.Append(LINKFLAGS=["-arch", env['arch'], '-isysroot', sdk_path, '-F' + sdk_path])
9696

97+
if env['arch'] == 'armv7':
98+
env.Prepend(CXXFLAGS=['-fno-aligned-allocation'])
99+
97100
if env['version'] == '3.2':
98101
env.Prepend(CFLAGS=['-std=gnu11'])
99102
env.Prepend(CXXFLAGS=['-DGLES_ENABLED', '-std=gnu++14'])
@@ -106,16 +109,22 @@ if env['version'] == '3.2':
106109
'-DPTRCALL_ENABLED',
107110
])
108111
elif env['target'] == 'release_debug':
109-
env.Prepend(CXXFLAGS=['-O2', '-ftree-vectorize', '-fomit-frame-pointer',
112+
env.Prepend(CXXFLAGS=['-O2', '-ftree-vectorize',
110113
'-DNDEBUG', '-DNS_BLOCK_ASSERTIONS=1', '-DDEBUG_ENABLED',
111114
'-DPTRCALL_ENABLED',
112115
])
116+
117+
if env['arch'] != 'armv7':
118+
env.Prepend(CXXFLAGS=['-fomit-frame-pointer'])
113119
else:
114120
env.Prepend(CXXFLAGS=[
115-
'-O2', '-ftree-vectorize', '-fomit-frame-pointer',
121+
'-O2', '-ftree-vectorize',
116122
'-DNDEBUG', '-DNS_BLOCK_ASSERTIONS=1',
117123
'-DPTRCALL_ENABLED',
118124
])
125+
126+
if env['arch'] != 'armv7':
127+
env.Prepend(CXXFLAGS=['-fomit-frame-pointer'])
119128
elif env['version'] == '4.0':
120129
env.Prepend(CFLAGS=['-std=gnu11'])
121130
env.Prepend(CXXFLAGS=['-DVULKAN_ENABLED', '-std=gnu++17'])
@@ -128,38 +137,44 @@ elif env['version'] == '4.0':
128137
])
129138
elif env['target'] == 'release_debug':
130139
env.Prepend(CXXFLAGS=[
131-
'-O2', '-ftree-vectorize', '-fomit-frame-pointer',
140+
'-O2', '-ftree-vectorize',
132141
'-DNDEBUG', '-DNS_BLOCK_ASSERTIONS=1', '-DDEBUG_ENABLED',
133142
])
143+
144+
if env['arch'] != 'armv7':
145+
env.Prepend(CXXFLAGS=['-fomit-frame-pointer'])
134146
else:
135147
env.Prepend(CXXFLAGS=[
136-
'-O2', '-ftree-vectorize', '-fomit-frame-pointer',
148+
'-O2', '-ftree-vectorize',
137149
'-DNDEBUG', '-DNS_BLOCK_ASSERTIONS=1',
138150
])
151+
152+
if env['arch'] != 'armv7':
153+
env.Prepend(CXXFLAGS=['-fomit-frame-pointer'])
139154
else:
140155
print("No valid version to set flags for.")
141156
quit();
142157

143158
# Adding header files
144159
env.Append(CPPPATH=[
145160
'.',
146-
'godot_headers',
147-
'godot_headers/main',
148-
'godot_headers/core',
149-
'godot_headers/core/os',
150-
'godot_headers/core/platform',
151-
'godot_headers/platform/iphone',
152-
'godot_headers/modules',
153-
'godot_headers/scene',
154-
'godot_headers/servers',
155-
'godot_headers/drivers',
156-
'godot_headers/thirdparty',
161+
'godot',
162+
'godot/main',
163+
'godot/core',
164+
'godot/core/os',
165+
'godot/core/platform',
166+
'godot/platform/iphone',
167+
'godot/modules',
168+
'godot/scene',
169+
'godot/servers',
170+
'godot/drivers',
171+
'godot/thirdparty',
157172
])
158173

159174
# tweak this if you want to use different folders, or more folders, to store your source code in.
160-
sources = Glob(env['plugin'] + '/*.cpp')
161-
sources.append(Glob(env['plugin'] + '/*.mm'))
162-
sources.append(Glob(env['plugin'] + '/*.m'))
175+
sources = Glob('plugins/' + env['plugin'] + '/*.cpp')
176+
sources.append(Glob('plugins/' + env['plugin'] + '/*.mm'))
177+
sources.append(Glob('plugins/' + env['plugin'] + '/*.m'))
163178

164179
# lib<plugin>.<arch>-<simulator|iphone>.<release|debug|release_debug>.a
165180
library_platform = env["arch"] + "-" + ("simulator" if env["simulator"] else "iphone")

arkit/SCsub

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

arkit/config.py

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

camera/SCsub

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

camera/config.py

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

gamecenter/SCsub

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

gamecenter/config.py

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

0 commit comments

Comments
 (0)