-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmeson.build
41 lines (36 loc) · 1.5 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
project('win11-toggle-rounded-corners', ['c', 'cpp'],
version : '1.2',
default_options : [
'cpp_std=c++latest',
'buildtype=release',
'prefer_static=true',
'warning_level=3',
'werror=true',
'default_library=static',
'b_vscrt=static_from_buildtype',
],
subproject_dir : 'deps')
cmake = import('cmake')
zydis_opts = cmake.subproject_options()
zydis_opts.add_cmake_defines({'ZYDIS_BUILD_TOOLS': false, 'ZYDIS_BUILD_EXAMPLES': false})
c_compiler_id = meson.get_compiler('c').get_id()
if c_compiler_id in ['msvc', 'clang-cl']
add_global_arguments(['/wd5072', '/wd4820', '/wd4455', '/wd4668', '/wd5039'], language: 'c')
zydis_opts.append_compile_args('c', ['/MT'])
if c_compiler_id == 'msvc'
zydis_opts.append_link_args('c', ['/EMITPOGOPHASEINFO', '/DEBUG:NONE', '/ASSEMBLYDEBUG:DISABLE', '/OPT:NOREF', '/LTCG'])
endif
else
warning('Unsupported compiler')
endif
cpp_compiler_id = meson.get_compiler('cpp').get_id()
if cpp_compiler_id in ['msvc', 'clang-cl']
add_global_arguments(['/wd5072', '/wd4820', '/wd4455', '/wd4668', '/wd5039'], language: 'cpp')
endif
zydis_proj = cmake.subproject('zydis', options : zydis_opts)
zydis_depends = zydis_proj.dependency('Zydis')
executable('win11-toggle-rounded-corners',
'main.cpp',
dependencies: [zydis_depends],
cpp_args: ['/W4', '/MT', '/permissive-', '/Brepro'],
link_args: ['/EMITPOGOPHASEINFO', '/DEBUG:NONE', '/ASSEMBLYDEBUG:DISABLE', '/OPT:NOREF', '/LTCG', '/Brepro', '/pdbaltpath:%_PDB%'])