mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Linux: Default to builtin openssl, freetype, and zlib
Fix support for cross-compilation, and fix handling of builtin libraries,
which would still attempt to link system libs and use system headers.
Also patch out GLU includes from GLEW, we don't need it, so that removes
another mandatory dependency.
(cherry picked from commit abf6a0919b)
This commit is contained in:
parent
a3a3cafbc8
commit
7ae44a055b
4 changed files with 63 additions and 17 deletions
|
|
@ -27,8 +27,10 @@ def get_opts():
|
|||
def get_flags():
|
||||
|
||||
return [
|
||||
('builtin_zlib', 'no'),
|
||||
('theora','no'), #use builtin openssl
|
||||
('builtin_zlib', 'yes'),
|
||||
('openssl', 'builtin'),
|
||||
("freetype", "builtin"),
|
||||
('theora','no'),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -71,8 +73,22 @@ def configure(env):
|
|||
|
||||
env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
|
||||
|
||||
|
||||
if (env["openssl"]=="yes"):
|
||||
env.ParseConfig('pkg-config openssl --cflags --libs')
|
||||
|
||||
if (env["freetype"]!="no"):
|
||||
env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
|
||||
if (env["freetype"]=="builtin"):
|
||||
env.Append(CPPPATH=['#tools/freetype'])
|
||||
env.Append(CPPPATH=['#tools/freetype/freetype/include'])
|
||||
else:
|
||||
env.ParseConfig('pkg-config freetype2 --cflags --libs')
|
||||
|
||||
env.Append(CPPFLAGS=['-DSERVER_ENABLED','-DUNIX_ENABLED'])
|
||||
env.Append(LIBS=['pthread','z']) #TODO detect linux/BSD!
|
||||
env.Append(LIBS=['pthread']) #TODO detect linux/BSD!
|
||||
if (env["builtin_zlib"]=="no"):
|
||||
env.Append(LIBS=['z'])
|
||||
|
||||
if (env["CXX"]=="clang++"):
|
||||
env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue