Skip to content

Commit

Permalink
Merge pull request #41 from Poing-Studios/fix_ci_3.x
Browse files Browse the repository at this point in the history
fix: build on 3.x Sconstruct file
  • Loading branch information
gumaciel authored Mar 5, 2023
2 parents 07acab4 + 28225ba commit 37f50de
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,20 @@ env.Append(CCFLAGS=[
# '-Wextra',
])

env.Append(CCFLAGS=['-arch', env['arch'], "-isysroot", "$IOS_SDK_PATH", "-stdlib=libc++", '-isysroot', sdk_path])
env.Append(CCFLAGS=['-arch', env['arch'], "-isysroot", "-stdlib=libc++", '-isysroot', sdk_path])
env.Append(CCFLAGS=['-DPTRCALL_ENABLED'])
env.Prepend(CXXFLAGS=[
'-DNEED_LONG_INT', '-DLIBYUV_DISABLE_NEON',
'-DIOS_ENABLED', '-DUNIX_ENABLED', '-DCOREAUDIO_ENABLED'
'-DUNIX_ENABLED', '-DCOREAUDIO_ENABLED'
])
env.Append(LINKFLAGS=["-arch", env['arch'], '-isysroot', sdk_path, '-F' + sdk_path])

if env['arch'] == 'armv7':
env.Prepend(CXXFLAGS=['-fno-aligned-allocation'])

if env['version'] == '3.x':
env.Append(CCFLAGS=["$IPHONESDK"])
env.Prepend(CXXFLAGS=['-DIPHONE_ENABLED'])
env.Prepend(CXXFLAGS=['-DVERSION_3_X'])

env.Prepend(CFLAGS=['-std=gnu11'])
Expand Down Expand Up @@ -133,6 +135,8 @@ if env['version'] == '3.x':
if env['arch'] != 'armv7':
env.Prepend(CXXFLAGS=['-fomit-frame-pointer'])
elif env['version'] == '4.0':
env.Append(CCFLAGS=["$IOS_SDK_PATH"])
env.Prepend(CXXFLAGS=['-DIOS_ENABLED'])
env.Prepend(CXXFLAGS=['-DVERSION_4_0'])

env.Prepend(CFLAGS=['-std=gnu11'])
Expand Down Expand Up @@ -184,7 +188,7 @@ sources.append(Glob('plugin/' + env['plugin'] + '/src/formats/*.mm'))
sources.append(Glob('plugin/' + env['plugin'] + '/src/module/*.mm'))

# lib<plugin>.<arch>-<simulator|ios>.<release|debug|release_debug>.a
library_platform = env["arch"] + "-" + ("simulator" if env["simulator"] else "ios")
library_platform = env["arch"] + "-" + ("simulator" if env["simulator"] else ("iphone" if env['version'] == '3.x' else "ios"))
library_name = env['plugin'] + "." + library_platform + "." + env["target"] + ".a"
library = env.StaticLibrary(target=env['target_path'] + library_name, source=sources)

Expand Down

0 comments on commit 37f50de

Please sign in to comment.