2019-12-17 08:03:41 -06:00
|
|
|
project('the-powder-toy', [ 'c', 'cpp' ], version: 'the.cake.is.a.lie', default_options: [
|
2021-12-13 07:41:02 -06:00
|
|
|
'cpp_std=c++17',
|
2022-02-16 06:31:31 -06:00
|
|
|
'build.cpp_std=c++17', # used when cross-compiling
|
2019-12-17 08:03:41 -06:00
|
|
|
])
|
|
|
|
|
2021-01-04 09:35:02 -06:00
|
|
|
to_array = generator(
|
2021-12-24 10:43:44 -06:00
|
|
|
executable('toarray', sources: 'data/ToArray.cpp', native: true),
|
2021-01-04 09:35:02 -06:00
|
|
|
output: [ '@PLAINNAME@.cpp', '@PLAINNAME@.h' ],
|
2021-12-07 10:15:21 -06:00
|
|
|
arguments: [ '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', '@EXTRA_ARGS@' ]
|
2021-01-04 09:35:02 -06:00
|
|
|
)
|
|
|
|
|
2019-12-17 08:03:41 -06:00
|
|
|
cpp_compiler = meson.get_compiler('cpp')
|
|
|
|
|
|
|
|
conf_data = configuration_data()
|
|
|
|
conf_data.set('CURL_STATICLIB', false)
|
|
|
|
conf_data.set('ZLIB_WINAPI', false)
|
|
|
|
|
|
|
|
copt_x86 = host_machine.cpu_family() in [ 'x86_64', 'x86' ]
|
|
|
|
copt_64bit = host_machine.cpu_family() in [ 'x86_64', 'aarch64' ]
|
|
|
|
copt_msvc = cpp_compiler.get_id() in [ 'msvc' ]
|
|
|
|
|
2021-03-12 14:02:02 -06:00
|
|
|
if cpp_compiler.get_id() in [ 'msvc' ]
|
|
|
|
copt_compiler = 'msvc'
|
2021-04-09 04:00:51 -05:00
|
|
|
elif cpp_compiler.get_id() in [ 'gcc', 'clang' ]
|
2021-03-12 14:02:02 -06:00
|
|
|
copt_compiler = 'gcc'
|
|
|
|
else
|
|
|
|
warning('unsupported compiler: ' + cpp_compiler.get_id() + '; you are on your own')
|
|
|
|
copt_compiler = 'gcc'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if host_machine.cpu_family() in [ 'x86_64' ]
|
|
|
|
copt_architecture = 'x86_64'
|
|
|
|
elif host_machine.cpu_family() in [ 'x86' ]
|
|
|
|
copt_architecture = 'i686'
|
2022-02-16 06:31:31 -06:00
|
|
|
elif host_machine.cpu_family() in [ 'aarch64' ]
|
|
|
|
copt_architecture = 'arm64'
|
2021-03-12 14:02:02 -06:00
|
|
|
else
|
|
|
|
warning('unsupported architecture: ' + host_machine.cpu_family() + '; you are on your own')
|
|
|
|
copt_architecture = 'i686'
|
|
|
|
endif
|
|
|
|
|
2019-12-17 08:03:41 -06:00
|
|
|
if host_machine.system() in [ 'linux', 'freebsd' ]
|
2021-01-21 11:26:30 -06:00
|
|
|
copt_platform = 'lin'
|
2019-12-17 08:03:41 -06:00
|
|
|
elif host_machine.system() in [ 'windows' ]
|
2021-01-21 11:26:30 -06:00
|
|
|
copt_platform = 'win'
|
2019-12-17 08:03:41 -06:00
|
|
|
elif host_machine.system() in [ 'darwin' ]
|
2021-01-21 11:26:30 -06:00
|
|
|
copt_platform = 'mac'
|
2019-12-17 08:03:41 -06:00
|
|
|
else
|
2021-03-12 14:02:02 -06:00
|
|
|
warning('unsupported platform: ' + host_machine.system() + '; you are on your own')
|
|
|
|
copt_platform = 'lin'
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('ogli') or get_option('oglr')
|
|
|
|
error('OpenGL features are currently unavailable')
|
|
|
|
endif
|
|
|
|
|
|
|
|
uopt_static = get_option('static')
|
2021-01-21 11:26:30 -06:00
|
|
|
use_tpt_libs = 'no'
|
2022-02-16 06:31:31 -06:00
|
|
|
tpt_libs_vtag = 'v20220217170412'
|
2019-12-17 08:03:41 -06:00
|
|
|
if uopt_static == 'system'
|
2021-01-21 11:26:30 -06:00
|
|
|
if copt_platform == 'win'
|
2019-12-17 08:03:41 -06:00
|
|
|
error('no way to find static system libraries on windows')
|
|
|
|
endif
|
|
|
|
elif uopt_static == 'prebuilt'
|
2021-01-21 11:26:30 -06:00
|
|
|
use_tpt_libs = 'static'
|
2019-12-17 08:03:41 -06:00
|
|
|
else
|
2021-01-21 11:26:30 -06:00
|
|
|
if copt_platform == 'win'
|
|
|
|
use_tpt_libs = 'dynamic'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
if use_tpt_libs != 'no'
|
2021-03-12 14:02:02 -06:00
|
|
|
nope = false
|
2021-10-22 09:38:42 -05:00
|
|
|
if copt_architecture == 'i686' and not copt_msvc
|
2021-03-12 14:02:02 -06:00
|
|
|
nope = true
|
|
|
|
endif
|
|
|
|
if copt_architecture == 'x86_64' and (copt_platform == 'lin' or copt_platform == 'mac') and copt_compiler != 'gcc'
|
|
|
|
nope = true
|
|
|
|
endif
|
2022-02-16 06:31:31 -06:00
|
|
|
if copt_architecture == 'arm64' and copt_platform != 'mac'
|
|
|
|
nope = true
|
|
|
|
endif
|
2021-10-22 09:38:42 -05:00
|
|
|
quad_compiler = copt_compiler
|
|
|
|
if copt_platform == 'win' and copt_compiler == 'gcc'
|
|
|
|
quad_compiler = 'mingw'
|
|
|
|
if get_option('b_lto')
|
|
|
|
error('mingw does not like static + lto, you will have to disable this error if you want to proceed')
|
|
|
|
endif
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
2021-07-31 10:05:33 -05:00
|
|
|
if nope
|
2021-10-22 09:38:42 -05:00
|
|
|
error('no prebuilt @0@-@1@-@2@-@3@ libraries are currently provided'.format(copt_architecture, copt_platform, quad_compiler, use_tpt_libs))
|
2021-03-12 14:02:02 -06:00
|
|
|
endif
|
2021-07-31 10:05:33 -05:00
|
|
|
tpt_libs = subproject('tpt-libs-prebuilt-@0@-@1@-@2@-@3@-@4@'.format(copt_architecture, copt_platform, quad_compiler, use_tpt_libs, tpt_libs_vtag))
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
uopt_native = get_option('native')
|
|
|
|
uopt_x86_sse = get_option('x86_sse')
|
|
|
|
if uopt_x86_sse == 'auto'
|
|
|
|
uopt_x86_sse_level = 20
|
|
|
|
elif uopt_x86_sse == 'sse3'
|
|
|
|
uopt_x86_sse_level = 30
|
|
|
|
elif uopt_x86_sse == 'sse2'
|
|
|
|
uopt_x86_sse_level = 20
|
|
|
|
elif uopt_x86_sse == 'sse'
|
|
|
|
uopt_x86_sse_level = 10
|
|
|
|
elif uopt_x86_sse == 'none'
|
|
|
|
uopt_x86_sse_level = 0
|
|
|
|
endif
|
|
|
|
if not copt_x86 or uopt_native
|
|
|
|
uopt_x86_sse_level = 0
|
|
|
|
endif
|
|
|
|
|
|
|
|
uopt_lua = get_option('lua')
|
|
|
|
if uopt_lua == 'luajit'
|
2021-01-21 11:26:30 -06:00
|
|
|
lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('luajit_dep') : dependency('luajit', static: uopt_static == 'system') ]
|
2019-12-17 08:03:41 -06:00
|
|
|
elif uopt_lua == 'lua5.2'
|
2021-01-21 11:26:30 -06:00
|
|
|
lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua52_dep') : dependency('lua5.2-c++', static: uopt_static == 'system') ]
|
2019-12-17 08:03:41 -06:00
|
|
|
elif uopt_lua == 'lua5.1'
|
2021-01-21 11:26:30 -06:00
|
|
|
lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua51_dep') : dependency('lua5.1-c++', static: uopt_static == 'system') ]
|
2019-12-17 08:03:41 -06:00
|
|
|
else
|
|
|
|
lua_opt_dep = []
|
|
|
|
endif
|
|
|
|
|
|
|
|
uopt_http = get_option('http')
|
|
|
|
if uopt_http
|
2021-01-21 11:26:30 -06:00
|
|
|
curl_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('libcurl_dep') : dependency('libcurl', static: uopt_static == 'system') ]
|
2019-12-17 08:03:41 -06:00
|
|
|
else
|
|
|
|
curl_opt_dep = []
|
|
|
|
endif
|
|
|
|
|
|
|
|
uopt_fftw = get_option('gravfft')
|
|
|
|
if uopt_fftw
|
2021-01-21 11:26:30 -06:00
|
|
|
fftw_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('fftw_dep') : dependency('fftw3f', static: uopt_static == 'system') ]
|
2019-12-17 08:03:41 -06:00
|
|
|
else
|
|
|
|
fftw_opt_dep = []
|
|
|
|
endif
|
|
|
|
|
|
|
|
threads_dep = dependency('threads')
|
2021-01-21 11:26:30 -06:00
|
|
|
zlib_dep = use_tpt_libs != 'no' ? tpt_libs.get_variable('zlib_dep') : dependency('zlib', static: uopt_static == 'system')
|
|
|
|
sdl2_dep = use_tpt_libs != 'no' ? tpt_libs.get_variable('sdl2_dep') : dependency('sdl2', static: uopt_static == 'system')
|
2019-12-17 08:03:41 -06:00
|
|
|
|
2021-02-15 11:07:32 -06:00
|
|
|
project_link_args = []
|
|
|
|
project_c_args = []
|
|
|
|
project_cpp_args = []
|
2019-12-17 08:03:41 -06:00
|
|
|
if copt_msvc
|
|
|
|
if uopt_x86_sse_level >= 30
|
|
|
|
message('SSE3 configured to be enabled but unavailable in msvc')
|
|
|
|
uopt_x86_sse_level = 20
|
|
|
|
endif
|
|
|
|
if uopt_native
|
|
|
|
message('local machine optimization configured to be enabled but unavailable in msvc')
|
|
|
|
uopt_native = false
|
|
|
|
endif
|
2021-02-15 11:07:32 -06:00
|
|
|
args_msvc = [
|
|
|
|
'/GS',
|
|
|
|
'-D_SCL_SECURE_NO_WARNINGS',
|
2021-10-15 10:04:04 -05:00
|
|
|
'-DUNICODE',
|
|
|
|
'-D_UNICODE',
|
2021-02-15 11:07:32 -06:00
|
|
|
]
|
2019-12-17 08:03:41 -06:00
|
|
|
if copt_64bit
|
|
|
|
message('SSE explicitly configured but unavailable in msvc targeting 64-bit machines')
|
|
|
|
else
|
|
|
|
if uopt_x86_sse_level >= 20
|
2021-02-15 11:07:32 -06:00
|
|
|
args_msvc += [ '/arch:SSE2' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
elif uopt_x86_sse_level >= 10
|
2021-02-15 11:07:32 -06:00
|
|
|
args_msvc += [ '/arch:SSE' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
endif
|
2021-02-15 11:07:32 -06:00
|
|
|
if get_option('debug')
|
|
|
|
project_link_args += [
|
|
|
|
'/NODEFAULTLIB:MSVCRT',
|
|
|
|
]
|
|
|
|
else
|
|
|
|
args_msvc += [
|
|
|
|
'/Oy-',
|
|
|
|
'/fp:fast',
|
|
|
|
]
|
|
|
|
project_link_args += [
|
|
|
|
'/OPT:REF',
|
|
|
|
'/OPT:ICF',
|
|
|
|
]
|
|
|
|
endif
|
2019-12-17 08:03:41 -06:00
|
|
|
project_c_args += args_msvc
|
|
|
|
project_cpp_args += args_msvc
|
|
|
|
else
|
2021-08-04 09:58:44 -05:00
|
|
|
args_ccomp = [ '-Wno-unused-result' ]
|
2021-01-21 11:26:30 -06:00
|
|
|
if copt_platform == 'mac'
|
2019-12-17 08:03:41 -06:00
|
|
|
if uopt_x86_sse_level >= 0
|
|
|
|
message('SSE level explicitly configured but unavailable on macosx')
|
|
|
|
uopt_x86_sse_level = 0
|
|
|
|
endif
|
|
|
|
if uopt_native
|
|
|
|
message('local machine optimization configured to be enabled but unavailable on macosx')
|
|
|
|
uopt_native = false
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
if uopt_x86_sse_level >= 30
|
2021-02-15 11:07:32 -06:00
|
|
|
args_ccomp += [ '-msse3' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
if uopt_x86_sse_level >= 20
|
2021-02-15 11:07:32 -06:00
|
|
|
args_ccomp += [ '-msse2' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
if uopt_x86_sse_level >= 10
|
2021-02-15 11:07:32 -06:00
|
|
|
args_ccomp += [ '-msse' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
if uopt_native
|
2021-02-15 11:07:32 -06:00
|
|
|
args_ccomp += [ '-march=native' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
endif
|
2021-10-22 09:38:42 -05:00
|
|
|
if copt_platform == 'win'
|
|
|
|
args_ccomp += [
|
|
|
|
'-DUNICODE',
|
|
|
|
'-D_UNICODE',
|
|
|
|
]
|
|
|
|
if uopt_static != 'none'
|
2021-11-12 23:37:54 -06:00
|
|
|
project_link_args += [ '-static', '-static-libgcc', '-static-libstdc++' ]
|
2021-10-22 09:38:42 -05:00
|
|
|
endif
|
|
|
|
endif
|
2019-12-17 08:03:41 -06:00
|
|
|
if not get_option('debug')
|
2021-02-15 11:07:32 -06:00
|
|
|
args_ccomp += [
|
|
|
|
'-ftree-vectorize',
|
|
|
|
'-funsafe-math-optimizations',
|
|
|
|
'-ffast-math',
|
|
|
|
'-fomit-frame-pointer',
|
|
|
|
]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
2021-04-10 11:24:37 -05:00
|
|
|
if copt_platform == 'mac' and uopt_static == 'prebuilt'
|
2021-04-09 04:00:51 -05:00
|
|
|
args_ccomp += [ '-mmacosx-version-min=10.9' ]
|
|
|
|
project_link_args += [ '-mmacosx-version-min=10.9' ]
|
|
|
|
endif
|
2022-02-16 06:31:31 -06:00
|
|
|
if not get_option('b_pie') and get_option('workaround_gcc_no_pie') # nice one, meson
|
2022-02-26 06:40:01 -06:00
|
|
|
if copt_architecture != 'arm64' # no position independent executable for arm64
|
|
|
|
if cpp_compiler.get_id() in [ 'clang' ]
|
|
|
|
project_link_args += [ '-Wl,-no_pie' ]
|
|
|
|
else
|
|
|
|
project_link_args += [ '-no-pie' ]
|
|
|
|
endif
|
2022-02-16 06:31:31 -06:00
|
|
|
endif
|
2021-04-10 11:24:37 -05:00
|
|
|
endif
|
2021-02-15 11:07:32 -06:00
|
|
|
project_c_args += args_ccomp
|
|
|
|
project_cpp_args += args_ccomp + [ '-Wno-invalid-offsetof' ]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
|
2021-01-21 11:26:30 -06:00
|
|
|
if copt_platform == 'win'
|
2019-12-17 08:03:41 -06:00
|
|
|
other_dep = tpt_libs.get_variable('other_dep')
|
2021-02-15 11:07:32 -06:00
|
|
|
args_ccomp_win = [ '-D_WIN32_WINNT=0x0501' ]
|
|
|
|
project_c_args += args_ccomp_win
|
|
|
|
project_cpp_args += args_ccomp_win
|
2019-12-17 08:03:41 -06:00
|
|
|
windows_mod = import('windows')
|
|
|
|
if uopt_static != 'none'
|
|
|
|
conf_data.set('CURL_STATICLIB', true)
|
2021-03-12 14:02:02 -06:00
|
|
|
if copt_architecture == 'x86_64'
|
|
|
|
conf_data.set('ZLIB_WINAPI', true)
|
|
|
|
endif
|
2019-12-17 08:03:41 -06:00
|
|
|
else
|
|
|
|
foreach input_and_output : tpt_libs.get_variable('config_dlls')
|
|
|
|
configure_file(input: input_and_output[0], output: input_and_output[1], copy: true)
|
|
|
|
endforeach
|
|
|
|
endif
|
2021-08-09 00:17:16 -05:00
|
|
|
elif copt_platform == 'lin'
|
|
|
|
if uopt_static != 'none'
|
2021-11-12 23:37:54 -06:00
|
|
|
project_link_args += [ '-static-libgcc', '-static-libstdc++' ]
|
2021-08-09 00:17:16 -05:00
|
|
|
endif
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
|
2022-02-16 06:31:31 -06:00
|
|
|
if copt_platform == 'mac' and uopt_lua == 'luajit' and copt_architecture != 'arm64'
|
2021-02-15 11:07:32 -06:00
|
|
|
project_link_args += [
|
|
|
|
'-pagezero_size', '10000',
|
|
|
|
'-image_base', '100000000',
|
|
|
|
]
|
2019-12-17 08:03:41 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
project_inc = include_directories([ 'src', 'data', 'resources' ])
|
|
|
|
|
2022-02-21 23:56:02 -06:00
|
|
|
if copt_platform == 'win'
|
|
|
|
copt_identplatform = copt_64bit ? 'WIN64' : 'WIN32'
|
|
|
|
elif copt_platform == 'lin'
|
|
|
|
copt_identplatform = copt_64bit ? 'LIN64' : 'LIN32'
|
|
|
|
elif copt_platform == 'mac'
|
|
|
|
copt_identplatform = copt_architecture == 'arm64' ? 'MACOSARM' : 'MACOSX'
|
|
|
|
else
|
|
|
|
copt_identplatform = 'UNKNOWN'
|
|
|
|
endif
|
|
|
|
|
2021-01-21 11:26:30 -06:00
|
|
|
conf_data.set('LIN', copt_platform == 'lin')
|
|
|
|
conf_data.set('WIN', copt_platform == 'win')
|
|
|
|
conf_data.set('MACOSX', copt_platform == 'mac')
|
2019-12-17 08:03:41 -06:00
|
|
|
conf_data.set('X86', copt_x86)
|
|
|
|
conf_data.set('X86_SSE3', uopt_x86_sse_level >= 30)
|
|
|
|
conf_data.set('X86_SSE2', uopt_x86_sse_level >= 20)
|
|
|
|
conf_data.set('X86_SSE', uopt_x86_sse_level >= 10)
|
|
|
|
conf_data.set('NATIVE', uopt_native)
|
|
|
|
conf_data.set('_64BIT', copt_64bit)
|
|
|
|
conf_data.set('OGLI', get_option('ogli'))
|
|
|
|
conf_data.set('OGLR', get_option('oglr'))
|
|
|
|
conf_data.set('PIX32OGL', get_option('ogli'))
|
|
|
|
conf_data.set('BETA', get_option('beta'))
|
|
|
|
conf_data.set('NO_INSTALL_CHECK', not get_option('install_check'))
|
|
|
|
conf_data.set('IGNORE_UPDATES', get_option('ignore_updates'))
|
|
|
|
conf_data.set('MOD_ID', get_option('mod_id'))
|
|
|
|
conf_data.set('DEBUG', get_option('debug'))
|
|
|
|
conf_data.set('SNAPSHOT', get_option('snapshot'))
|
|
|
|
conf_data.set('SNAPSHOT_ID', get_option('snapshot_id'))
|
2020-12-15 15:02:56 -06:00
|
|
|
conf_data.set('SERVER', '"' + get_option('server') + '"')
|
|
|
|
conf_data.set('STATICSERVER', '"' + get_option('static_server') + '"')
|
2022-02-21 23:56:02 -06:00
|
|
|
conf_data.set('IDENT_PLATFORM', '"' + copt_identplatform + '"')
|
2022-02-22 01:08:53 -06:00
|
|
|
conf_data.set('IDENT', '"@0@-@1@-@2@"'.format(copt_architecture, copt_platform, copt_compiler).to_upper())
|
2022-02-21 23:56:02 -06:00
|
|
|
|
2020-12-15 15:02:56 -06:00
|
|
|
if get_option('update_server') != ''
|
|
|
|
conf_data.set('UPDATESERVER', '"' + get_option('update_server') + '"')
|
|
|
|
else
|
|
|
|
conf_data.set('UPDATESERVER', false)
|
|
|
|
endif
|
2019-12-17 08:03:41 -06:00
|
|
|
|
|
|
|
resources_files = []
|
|
|
|
|
|
|
|
subdir('src')
|
|
|
|
subdir('data')
|
|
|
|
subdir('resources')
|
|
|
|
|
|
|
|
if get_option('build_powder')
|
|
|
|
powder_deps = [
|
|
|
|
threads_dep,
|
|
|
|
zlib_dep,
|
|
|
|
sdl2_dep,
|
|
|
|
lua_opt_dep,
|
|
|
|
curl_opt_dep,
|
|
|
|
fftw_opt_dep,
|
|
|
|
]
|
2021-01-21 11:26:30 -06:00
|
|
|
if copt_platform == 'win'
|
2019-12-17 08:03:41 -06:00
|
|
|
powder_deps += other_dep
|
|
|
|
endif
|
|
|
|
executable(
|
|
|
|
'powder',
|
|
|
|
sources: powder_files,
|
2021-01-18 05:20:36 -06:00
|
|
|
include_directories: [ project_inc, powder_inc ],
|
|
|
|
c_args: project_c_args,
|
|
|
|
cpp_args: project_cpp_args,
|
2022-02-16 06:31:31 -06:00
|
|
|
gui_app: not get_option('debug'),
|
2019-12-17 08:03:41 -06:00
|
|
|
link_args: project_link_args,
|
|
|
|
dependencies: powder_deps,
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('build_render')
|
|
|
|
render_deps = [
|
|
|
|
threads_dep,
|
|
|
|
zlib_dep,
|
|
|
|
]
|
|
|
|
executable(
|
|
|
|
'render',
|
|
|
|
sources: render_files,
|
2021-01-18 05:20:36 -06:00
|
|
|
include_directories: [ project_inc, render_inc ],
|
|
|
|
c_args: project_c_args,
|
|
|
|
cpp_args: project_cpp_args,
|
2019-12-17 08:03:41 -06:00
|
|
|
link_args: project_link_args,
|
|
|
|
dependencies: render_deps,
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('build_font')
|
|
|
|
font_deps = [
|
|
|
|
threads_dep,
|
|
|
|
zlib_dep,
|
|
|
|
sdl2_dep,
|
|
|
|
]
|
2021-01-21 11:26:30 -06:00
|
|
|
if copt_platform == 'win'
|
2019-12-17 08:03:41 -06:00
|
|
|
font_deps += other_dep
|
|
|
|
endif
|
|
|
|
executable(
|
|
|
|
'font',
|
|
|
|
sources: font_files,
|
2021-01-18 05:20:36 -06:00
|
|
|
include_directories: [ project_inc, font_inc ],
|
|
|
|
c_args: project_c_args,
|
|
|
|
cpp_args: project_cpp_args,
|
2019-12-17 08:03:41 -06:00
|
|
|
link_args: project_link_args,
|
|
|
|
dependencies: font_deps,
|
|
|
|
)
|
|
|
|
endif
|