mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +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.
This commit is contained in:
parent
9eebaed89f
commit
abf6a0919b
4 changed files with 64 additions and 18 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'),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -68,8 +70,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