You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
server: Allow building against system libraries
(cherry picked from commit 5e360fe178)
This commit is contained in:
@@ -66,6 +66,42 @@ def configure(env):
|
|||||||
|
|
||||||
env.Append(CCFLAGS=['-g2', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
env.Append(CCFLAGS=['-g2', '-Wall', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
||||||
|
|
||||||
|
|
||||||
|
# Shared libraries, when requested
|
||||||
|
|
||||||
|
if (env['builtin_openssl'] == 'no'):
|
||||||
|
env.ParseConfig('pkg-config openssl --cflags --libs')
|
||||||
|
|
||||||
|
if (env['builtin_libwebp'] == 'no'):
|
||||||
|
env.ParseConfig('pkg-config libwebp --cflags --libs')
|
||||||
|
|
||||||
|
if (env['builtin_freetype'] == 'no'):
|
||||||
|
env['builtin_libpng'] = 'no' # Freetype links against libpng
|
||||||
|
env.ParseConfig('pkg-config freetype2 --cflags --libs')
|
||||||
|
|
||||||
|
if (env['builtin_libpng'] == 'no'):
|
||||||
|
env.ParseConfig('pkg-config libpng --cflags --libs')
|
||||||
|
|
||||||
|
# Sound and video libraries
|
||||||
|
# Keep the order as it triggers chained dependencies (ogg needed by others, etc.)
|
||||||
|
|
||||||
|
if (env['builtin_libtheora'] == 'no'):
|
||||||
|
env['builtin_libogg'] = 'no' # Needed to link against system libtheora
|
||||||
|
env['builtin_libvorbis'] = 'no' # Needed to link against system libtheora
|
||||||
|
env.ParseConfig('pkg-config theora theoradec --cflags --libs')
|
||||||
|
|
||||||
|
if (env['builtin_libvorbis'] == 'no'):
|
||||||
|
env['builtin_libogg'] = 'no' # Needed to link against system libvorbis
|
||||||
|
env.ParseConfig('pkg-config vorbis vorbisfile --cflags --libs')
|
||||||
|
|
||||||
|
if (env['builtin_opus'] == 'no'):
|
||||||
|
env['builtin_libogg'] = 'no' # Needed to link against system opus
|
||||||
|
env.ParseConfig('pkg-config opus opusfile --cflags --libs')
|
||||||
|
|
||||||
|
if (env['builtin_libogg'] == 'no'):
|
||||||
|
env.ParseConfig('pkg-config ogg --cflags --libs')
|
||||||
|
|
||||||
|
|
||||||
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
||||||
env.Append(LIBS=['pthread', 'z']) # TODO detect linux/BSD!
|
env.Append(LIBS=['pthread', 'z']) # TODO detect linux/BSD!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user