2023-11-05 12:47:07 +01:00
|
|
|
project('TaikoArcadeLoader', 'c', 'cpp', 'nasm', version: '1.0.0', default_options : ['c_std=c11', 'cpp_std=c++23'])
|
2023-09-10 07:50:00 +02:00
|
|
|
warning_level = 3
|
|
|
|
debug = true
|
|
|
|
optimization = 3
|
|
|
|
b_lto = true
|
|
|
|
b_pgo = 'use'
|
2024-03-22 12:58:36 +01:00
|
|
|
cmake = import('cmake')
|
|
|
|
opt_var = cmake.subproject_options()
|
|
|
|
opt_var.set_override_option('cpp_std', 'c++23')
|
2023-09-10 07:50:00 +02:00
|
|
|
|
|
|
|
cpp = meson.get_compiler('cpp')
|
|
|
|
|
|
|
|
add_project_arguments(
|
|
|
|
cpp.get_supported_arguments(
|
|
|
|
'-D_WIN32_WINNT=_WIN32_WINNT_WIN10',
|
|
|
|
),
|
|
|
|
language: 'cpp',
|
|
|
|
)
|
|
|
|
|
|
|
|
add_project_link_arguments(
|
|
|
|
cpp.get_supported_arguments(
|
|
|
|
'-static',
|
|
|
|
#'-s',
|
|
|
|
'-lws2_32',
|
|
|
|
'-lssp',
|
2024-03-22 12:58:36 +01:00
|
|
|
'-lntdll'
|
2023-09-10 07:50:00 +02:00
|
|
|
),
|
|
|
|
language: 'cpp',
|
|
|
|
)
|
|
|
|
|
|
|
|
minhook = subproject('minhook')
|
|
|
|
tomlc99 = subproject('tomlc99')
|
|
|
|
sdl2 = subproject('sdl2', default_options: ['default_library=static', 'test=false', 'use_render=disabled'])
|
|
|
|
xxhash = subproject('xxhash', default_options: ['default_library=static', 'cli=false'])
|
2024-03-22 12:58:36 +01:00
|
|
|
opt_var.add_cmake_defines({'SAFETYHOOK_FETCH_ZYDIS': true})
|
|
|
|
safetyhook_proj = cmake.subproject('safetyhook', options: opt_var)
|
|
|
|
safetyhook_dep = safetyhook_proj.dependency('safetyhook')
|
2024-03-21 20:50:02 +01:00
|
|
|
stb = subproject('stb')
|
2024-03-22 12:58:36 +01:00
|
|
|
zxing_proj = cmake.subproject('zxing', options: opt_var)
|
|
|
|
zxing_dep = zxing_proj.dependency('ZXing')
|
2023-09-10 07:50:00 +02:00
|
|
|
|
|
|
|
library(
|
|
|
|
'bnusio',
|
|
|
|
link_with: [
|
|
|
|
minhook.get_variable('minhook_lib'),
|
|
|
|
tomlc99.get_variable('tomlc99_lib'),
|
|
|
|
sdl2.get_variable('sdl2'),
|
|
|
|
xxhash.get_variable('xxhash'),
|
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
'src',
|
|
|
|
minhook.get_variable('minhook_inc'),
|
|
|
|
tomlc99.get_variable('tomlc99_inc'),
|
|
|
|
sdl2.get_variable('core_inc'),
|
|
|
|
xxhash.get_variable('inc'),
|
|
|
|
],
|
2024-03-21 20:50:02 +01:00
|
|
|
dependencies: [stb.get_variable('stb_dep'),
|
|
|
|
zxing_dep,
|
2024-03-22 12:58:36 +01:00
|
|
|
safetyhook_dep,
|
2024-03-21 20:50:02 +01:00
|
|
|
],
|
2023-09-10 07:50:00 +02:00
|
|
|
sources : [
|
|
|
|
'src/dllmain.cpp',
|
|
|
|
'src/helpers.cpp',
|
|
|
|
'src/poll.cpp',
|
|
|
|
'src/bnusio.cpp',
|
|
|
|
'src/patches/jp_nov_2020.cpp',
|
|
|
|
'src/patches/cn_jun_2023.cpp',
|
2024-03-07 02:29:11 +01:00
|
|
|
'src/patches/jp_apr_2023.cpp',
|
2023-09-11 06:57:50 +02:00
|
|
|
'src/patches/amauth.cpp',
|
2023-09-18 17:10:54 +02:00
|
|
|
'src/patches/qr.cpp',
|
2023-09-10 07:50:00 +02:00
|
|
|
],
|
|
|
|
name_prefix: ''
|
|
|
|
)
|