mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00

In the current state, meson is searching for static dependencies, and if it does not find them, it will link dynamically anyway. On a system without any static libraries, meson produces 90 warnings at setup phase like this one : > WARNING: Static library 'avcodec' not found for dependency > 'libavcodec', may not be statically linked This commit is adding a meson *staticdeps* option (defaulting to true). This allow us to disable static dependencies search if we know that we don't want to link statically. You can disable static linking by using this option at setup phase : > $ meson setup [...] -Dstaticdeps=false Linking dynamically will require two additional dependencies : * zlib * glibc's libm Without linking to zlib, build is failing with : > [...]x86_64-pc-linux-gnu/bin/ld: > TR1X.p/src_game_savegame_savegame_bson.c.o: undefined reference > to symbol 'compressBound@@ZLIB_1.2.0' > [..]x86_64-pc-linux-gnu/bin/ld: > /lib64/libz.so.1: error adding symbols: DSO missing from command line > collect2: error: ld returned 1 exit status Without linking to libm, build is failing with : > [...]x86_64-pc-linux-gnu/bin/ld: > TR1X.p/src_game_screen.c.o: undefined reference > to symbol 'round@@GLIBC_2.2.5' > [...]x86_64-pc-linux-gnu/bin/ld: > /lib64/libm.so.6: error adding symbols: DSO missing from command line > collect2: error: ld returned 1 exit status Signed-off-by: Fabrice Delliaux <netbox253@gmail.com>
1 line
123 B
Text
1 line
123 B
Text
option('staticdeps', type: 'boolean', value: true, description: 'Try to build against static dependencies. default: true')
|