Description: Adapt buildsys to use external libs
Author: Alexandre Viau <aviau@debian.org>
Author: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Last-Update: 2020-10-21
Forwarded: not-needed

--- a/meson.build
+++ b/meson.build
@@ -50,11 +50,7 @@
 
 dxvk_include_path = include_directories('./include')
 
-if (cpu_family == 'x86_64')
-  dxvk_library_path = meson.source_root() + '/lib'
-else
-  dxvk_library_path = meson.source_root() + '/lib32'
-endif
+wine_libdir = get_option('wine_libdir')
 
 dxvk_extradep = [ ]
 
@@ -86,11 +82,11 @@
   endif
 endif
 
-lib_vulkan  = dxvk_compiler.find_library('vulkan-1', dirs : dxvk_library_path)
-lib_d3d9    = dxvk_compiler.find_library('d3d9')
-lib_d3d11   = dxvk_compiler.find_library('d3d11')
-lib_dxgi    = dxvk_compiler.find_library('dxgi')
-lib_d3dcompiler_43 = dxvk_compiler.find_library('d3dcompiler_43', dirs : dxvk_library_path)
+lib_vulkan  = dxvk_compiler.find_library('vulkan-1', dirs : wine_libdir)
+lib_d3d9    = dxvk_compiler.find_library('d3d9', dirs : wine_libdir)
+lib_d3d11   = dxvk_compiler.find_library('d3d11', dirs : wine_libdir)
+lib_dxgi    = dxvk_compiler.find_library('dxgi', dirs : wine_libdir)
+lib_d3dcompiler_43 = dxvk_compiler.find_library('d3dcompiler_43')
 
 if dxvk_is_msvc
   lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler')
--- a/build-win64.txt
+++ b/build-win64.txt
@@ -7,6 +7,8 @@
 
 [properties]
 needs_exe_wrapper = true
+c_args=['-m64', '-fvisibility=hidden']
+cpp_args=['-m64', '-fvisibility=hidden', '-fvisibility-inlines-hidden', '-D__WIDL_objidl_generated_name_0000000C=']
 
 [host_machine]
 system = 'windows'
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
+option('wine_libdir', type: 'string')
 option('enable_tests', type : 'boolean', value : false)
 option('enable_dxgi',  type : 'boolean', value : true, description: 'Build DXGI')
 option('enable_d3d9',  type : 'boolean', value : true, description: 'Build D3D9')
