@@ -15,7 +15,6 @@ project(
1515)
1616
1717compile_args = []
18- link_args = []
1918deps = []
2019recording_dependencies = []
2120
@@ -47,8 +46,8 @@ elif cpp.get_id() == 'clang'
4746 endif
4847
4948 if build_with_libcpp
50- compile_args += ' -stdlib=libc++'
51- link_args += ' -stdlib=libc++'
49+ add_global_link_arguments ( ' -stdlib=libc++' , language :[ ' cpp ' ])
50+ add_global_arguments ( ' -stdlib=libc++' , language :[ ' cpp ' ])
5251 deps += cpp.find_library (' c++' )
5352 deps += cpp.find_library (' c++abi' )
5453 endif
@@ -264,11 +263,11 @@ argparse_dep = dependency('argparse', required: true)
264263recording_dependencies += argparse_dep
265264deps += argparse_dep
266265
267- online_multiplayer_not_supported = true
266+ online_multiplayer_supported = true
268267
269268if meson .is_cross_build() and host_machine .system() == ' switch'
270269 compile_args += [' -D_ONLINE_MULTIPLAYER_NOT_SUPPORTED' ]
271- online_multiplayer_not_supported = false
270+ online_multiplayer_supported = false
272271else
273272 deps += dependency (
274273 ' cpp-httplib' ,
@@ -326,6 +325,8 @@ endif
326325is_flatpak_build = get_option (' flatpak_build' )
327326
328327have_file_dialogs = false
328+ have_discord_sdk = false
329+
329330
330331nfde_dep = dependency (
331332 ' nativefiledialog-extended' ,
@@ -338,6 +339,16 @@ if nfde_dep.found()
338339 compile_args += ' -D_HAVE_FILE_DIALOGS'
339340endif
340341
342+ discord_sdk_dep = dependency (
343+ ' discord-game-sdk' ,
344+ required : not meson .is_cross_build(),
345+ default_options : {' clang_libcpp' : ' disabled' },
346+ )
347+ if discord_sdk_dep.found()
348+ have_discord_sdk = true
349+ deps += discord_sdk_dep
350+ compile_args += ' -D_HAVE_DISCORD_SDK'
351+ endif
341352
342353
343354src_files = []
567578 dependencies : deps,
568579 c_args : sdl2_mixer_defines,
569580 cpp_args : compile_args + sdl2_mixer_defines,
570- link_args : link_args,
571581 override_options : {
572582 ' warning_level' : ' 3' ,
573583 ' werror' : true ,
580590 recording_src_files,
581591 dependencies : recording_dependencies,
582592 include_directories : recording_inc_dirs,
583- cpp_args : [compile_args, ' -D_NO_SDL' , ' -D_NO_SPDLOG' ],
584- link_args : link_args,
593+ cpp_args : [compile_args, ' -D_NO_SDL' , ' -D_NO_SPDLOG' , ' -D_OOPETRIS_RECORDING_UTILITY' ],
585594 override_options : {
586595 ' warning_level' : ' 3' ,
587596 ' werror' : true ,
0 commit comments