[vala/meson-msvc: 17/18] meson: Symlink to valacodegen.dll in bindir




commit eceda7ac9fd7d507566fb53f0c4159f64db2e90f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jan 27 12:43:45 2022 +0800

    meson: Symlink to valacodegen.dll in bindir
    
    This is so that valac builds on Windows can find valacodegen.dll when we
    are doing shared builds.

 codegen/meson.build  | 5 +++++
 compiler/meson.build | 2 ++
 2 files changed, 7 insertions(+)
---
diff --git a/codegen/meson.build b/codegen/meson.build
index 59142caf0..223832a67 100644
--- a/codegen/meson.build
+++ b/codegen/meson.build
@@ -43,6 +43,11 @@ valacodegen_lib = library(
        vala_vapi: 'valacodegen.vapi',
 )
 
+if cc.get_argument_syntax() == 'msvc' and \
+   get_option('default_library') == 'shared'
+       meson.add_install_script('cmd', '/c', 'cd /d @0@ & (if exist @2@.dll del @2@.dll) & mklink @2@.dll 
@1@\@2@.dll'.format(join_paths(get_option('prefix'), get_option('bindir')).replace('/','\\'), 
pkglibdir.replace('/', '\\'), 'valacodegen'))
+endif
+
 valacodegen_dep = declare_dependency(
        link_with: [valacodegen_lib],
        dependencies: [valacore_dep, valaccode_dep],
diff --git a/compiler/meson.build b/compiler/meson.build
index a07330f69..4350ba753 100644
--- a/compiler/meson.build
+++ b/compiler/meson.build
@@ -5,6 +5,8 @@ valac_sources = files(
 valac_name = 'valac@0@'.format(vala_version_suffix)
 
 extra_compiler_include_dirs = []
+extra_compiler_linker_args = []
+extra_compiler_libs = []
 
 if cc.get_argument_syntax() == 'msvc'
        extra_compiler_include_dirs += include_directories('../msvc')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]