Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
7d392cd6
Commit
7d392cd6
authored
Jun 07, 2018
by
Rémi Verschelde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCons: Allow unbundling libwebsockets and miniupnpc
parent
b4c65093
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
17 deletions
+36
-17
SConstruct
SConstruct
+3
-2
detect.py
platform/server/detect.py
+15
-3
detect.py
platform/x11/detect.py
+18
-12
No files found.
SConstruct
View file @
7d392cd6
...
@@ -171,11 +171,11 @@ opts.Add(EnumVariable('warnings', "Set the level of warnings emitted during comp
...
@@ -171,11 +171,11 @@ opts.Add(EnumVariable('warnings', "Set the level of warnings emitted during comp
opts
.
Add
(
BoolVariable
(
'progress'
,
"Show a progress indicator during build"
,
True
))
opts
.
Add
(
BoolVariable
(
'progress'
,
"Show a progress indicator during build"
,
True
))
opts
.
Add
(
BoolVariable
(
'dev'
,
"If yes, alias for verbose=yes warnings=all"
,
False
))
opts
.
Add
(
BoolVariable
(
'dev'
,
"If yes, alias for verbose=yes warnings=all"
,
False
))
opts
.
Add
(
EnumVariable
(
'macports_clang'
,
"Build using clang from MacPorts"
,
'no'
,
(
'no'
,
'5.0'
,
'devel'
)))
opts
.
Add
(
EnumVariable
(
'macports_clang'
,
"Build using clang from MacPorts"
,
'no'
,
(
'no'
,
'5.0'
,
'devel'
)))
opts
.
Add
(
BoolVariable
(
'no_editor_splash'
,
"Don't use the custom splash screen for the editor"
,
False
))
# Thirdparty libraries
# Thirdparty libraries
opts
.
Add
(
BoolVariable
(
'builtin_bullet'
,
"Use the builtin bullet library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_bullet'
,
"Use the builtin bullet library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_enet'
,
"Use the builtin enet library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_enet'
,
"Use the builtin enet library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_miniupnpc'
,
"Use the builtin miniupnpc library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_freetype'
,
"Use the builtin freetype library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_freetype'
,
"Use the builtin freetype library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libogg'
,
"Use the builtin libogg library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libogg'
,
"Use the builtin libogg library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libpng'
,
"Use the builtin libpng library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libpng'
,
"Use the builtin libpng library"
,
True
))
...
@@ -183,7 +183,9 @@ opts.Add(BoolVariable('builtin_libtheora', "Use the builtin libtheora library",
...
@@ -183,7 +183,9 @@ opts.Add(BoolVariable('builtin_libtheora', "Use the builtin libtheora library",
opts
.
Add
(
BoolVariable
(
'builtin_libvorbis'
,
"Use the builtin libvorbis library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libvorbis'
,
"Use the builtin libvorbis library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libvpx'
,
"Use the builtin libvpx library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libvpx'
,
"Use the builtin libvpx library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libwebp'
,
"Use the builtin libwebp library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libwebp'
,
"Use the builtin libwebp library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_libwebsockets'
,
"Use the builtin libwebsockets library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_mbedtls'
,
"Use the builtin mbedTLS library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_mbedtls'
,
"Use the builtin mbedTLS library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_miniupnpc'
,
"Use the builtin miniupnpc library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_opus'
,
"Use the builtin opus library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_opus'
,
"Use the builtin opus library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_pcre2'
,
"Use the builtin pcre2 library)"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_pcre2'
,
"Use the builtin pcre2 library)"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_recast'
,
"Use the builtin recast library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_recast'
,
"Use the builtin recast library"
,
True
))
...
@@ -191,7 +193,6 @@ opts.Add(BoolVariable('builtin_squish', "Use the builtin squish library", True))
...
@@ -191,7 +193,6 @@ opts.Add(BoolVariable('builtin_squish', "Use the builtin squish library", True))
opts
.
Add
(
BoolVariable
(
'builtin_thekla_atlas'
,
"Use the builtin thekla_altas library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_thekla_atlas'
,
"Use the builtin thekla_altas library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_zlib'
,
"Use the builtin zlib library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_zlib'
,
"Use the builtin zlib library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_zstd'
,
"Use the builtin zstd library"
,
True
))
opts
.
Add
(
BoolVariable
(
'builtin_zstd'
,
"Use the builtin zstd library"
,
True
))
opts
.
Add
(
BoolVariable
(
'no_editor_splash'
,
"Don't use the custom splash screen for the editor"
,
False
))
# Compilation environment setup
# Compilation environment setup
opts
.
Add
(
"CXX"
,
"C++ compiler"
)
opts
.
Add
(
"CXX"
,
"C++ compiler"
)
...
...
platform/server/detect.py
View file @
7d392cd6
...
@@ -67,9 +67,6 @@ def configure(env):
...
@@ -67,9 +67,6 @@ def configure(env):
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
if
not
env
[
'builtin_libwebp'
]:
env
.
ParseConfig
(
'pkg-config libwebp --cflags --libs'
)
# freetype depends on libpng and zlib, so bundling one of them while keeping others
# freetype depends on libpng and zlib, so bundling one of them while keeping others
# as shared libraries leads to weird issues
# as shared libraries leads to weird issues
if
env
[
'builtin_freetype'
]
or
env
[
'builtin_libpng'
]
or
env
[
'builtin_zlib'
]:
if
env
[
'builtin_freetype'
]
or
env
[
'builtin_libpng'
]
or
env
[
'builtin_zlib'
]:
...
@@ -124,6 +121,21 @@ def configure(env):
...
@@ -124,6 +121,21 @@ def configure(env):
if
not
env
[
'builtin_libogg'
]:
if
not
env
[
'builtin_libogg'
]:
env
.
ParseConfig
(
'pkg-config ogg --cflags --libs'
)
env
.
ParseConfig
(
'pkg-config ogg --cflags --libs'
)
if
not
env
[
'builtin_libwebp'
]:
env
.
ParseConfig
(
'pkg-config libwebp --cflags --libs'
)
if
not
env
[
'builtin_mbedtls'
]:
# mbedTLS does not provide a pkgconfig config yet. See https://github.com/ARMmbed/mbedtls/issues/228
env
.
Append
(
LIBS
=
[
'mbedtls'
,
'mbedcrypto'
,
'mbedx509'
])
if
not
env
[
'builtin_libwebsockets'
]:
env
.
ParseConfig
(
'pkg-config libwebsockets --cflags --libs'
)
if
not
env
[
'builtin_miniupnpc'
]:
# No pkgconfig file so far, hardcode default paths.
env
.
Append
(
CPPPATH
=
[
"/usr/include/miniupnpc"
])
env
.
Append
(
LIBS
=
[
"miniupnpc"
])
# On Linux wchar_t should be 32-bits
# On Linux wchar_t should be 32-bits
# 16-bit library shouldn't be required due to compiler optimisations
# 16-bit library shouldn't be required due to compiler optimisations
if
not
env
[
'builtin_pcre2'
]:
if
not
env
[
'builtin_pcre2'
]:
...
...
platform/x11/detect.py
View file @
7d392cd6
...
@@ -158,14 +158,6 @@ def configure(env):
...
@@ -158,14 +158,6 @@ def configure(env):
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
if
not
env
[
'builtin_mbedtls'
]:
# mbedTLS does not provide a pkgconfig config yet. See https://github.com/ARMmbed/mbedtls/issues/228
env
.
Append
(
LIBS
=
[
'mbedtls'
,
'mbedcrypto'
,
'mbedx509'
])
if
not
env
[
'builtin_libwebp'
]:
env
.
ParseConfig
(
'pkg-config libwebp --cflags --libs'
)
# freetype depends on libpng and zlib, so bundling one of them while keeping others
# freetype depends on libpng and zlib, so bundling one of them while keeping others
# as shared libraries leads to weird issues
# as shared libraries leads to weird issues
if
env
[
'builtin_freetype'
]
or
env
[
'builtin_libpng'
]
or
env
[
'builtin_zlib'
]:
if
env
[
'builtin_freetype'
]
or
env
[
'builtin_libpng'
]
or
env
[
'builtin_zlib'
]:
...
@@ -205,6 +197,10 @@ def configure(env):
...
@@ -205,6 +197,10 @@ def configure(env):
env
[
'builtin_libogg'
]
=
False
# Needed to link against system libtheora
env
[
'builtin_libogg'
]
=
False
# Needed to link against system libtheora
env
[
'builtin_libvorbis'
]
=
False
# Needed to link against system libtheora
env
[
'builtin_libvorbis'
]
=
False
# Needed to link against system libtheora
env
.
ParseConfig
(
'pkg-config theora theoradec --cflags --libs'
)
env
.
ParseConfig
(
'pkg-config theora theoradec --cflags --libs'
)
else
:
list_of_x86
=
[
'x86_64'
,
'x86'
,
'i386'
,
'i586'
]
if
any
(
platform
.
machine
()
in
s
for
s
in
list_of_x86
):
env
[
"x86_libtheora_opt_gcc"
]
=
True
if
not
env
[
'builtin_libvpx'
]:
if
not
env
[
'builtin_libvpx'
]:
env
.
ParseConfig
(
'pkg-config vpx --cflags --libs'
)
env
.
ParseConfig
(
'pkg-config vpx --cflags --libs'
)
...
@@ -220,10 +216,20 @@ def configure(env):
...
@@ -220,10 +216,20 @@ def configure(env):
if
not
env
[
'builtin_libogg'
]:
if
not
env
[
'builtin_libogg'
]:
env
.
ParseConfig
(
'pkg-config ogg --cflags --libs'
)
env
.
ParseConfig
(
'pkg-config ogg --cflags --libs'
)
if
env
[
'builtin_libtheora'
]:
if
not
env
[
'builtin_libwebp'
]:
list_of_x86
=
[
'x86_64'
,
'x86'
,
'i386'
,
'i586'
]
env
.
ParseConfig
(
'pkg-config libwebp --cflags --libs'
)
if
any
(
platform
.
machine
()
in
s
for
s
in
list_of_x86
):
env
[
"x86_libtheora_opt_gcc"
]
=
True
if
not
env
[
'builtin_mbedtls'
]:
# mbedTLS does not provide a pkgconfig config yet. See https://github.com/ARMmbed/mbedtls/issues/228
env
.
Append
(
LIBS
=
[
'mbedtls'
,
'mbedcrypto'
,
'mbedx509'
])
if
not
env
[
'builtin_libwebsockets'
]:
env
.
ParseConfig
(
'pkg-config libwebsockets --cflags --libs'
)
if
not
env
[
'builtin_miniupnpc'
]:
# No pkgconfig file so far, hardcode default paths.
env
.
Append
(
CPPPATH
=
[
"/usr/include/miniupnpc"
])
env
.
Append
(
LIBS
=
[
"miniupnpc"
])
# On Linux wchar_t should be 32-bits
# On Linux wchar_t should be 32-bits
# 16-bit library shouldn't be required due to compiler optimisations
# 16-bit library shouldn't be required due to compiler optimisations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment