[glibmm/kjellahl/meson-build-master] gio/giomm/meson.build: Use giomm-int rule for all builds



commit 456508a2806e1ed16a444dce85941777cf42c63b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Mar 2 15:58:15 2020 +0800

    gio/giomm/meson.build: Use giomm-int rule for all builds
    
    Like the previous commit, let builds from release tarballs and GIT
    checkouts build the giomm-int static library, and link the final
    .so/.dll from the objects that form giomm-int static .lib.  By doing so
    we can build giomm with the import libraries for Visual Studio builds
    with gendef, as well as linking in the version resource for all Windows
    builds.

 gio/giomm/meson.build | 70 +++++++++++++++++++++++++--------------------------
 1 file changed, 35 insertions(+), 35 deletions(-)
---
diff --git a/gio/giomm/meson.build b/gio/giomm/meson.build
index 4029864c..8cd95bc9 100644
--- a/gio/giomm/meson.build
+++ b/gio/giomm/meson.build
@@ -291,14 +291,14 @@ if maintainer_mode
   )
 
   extra_include_dirs = ['..', '..' / '..' / 'glib']
-  giomm_library = library(giomm_pcname,
+  gio_int_lib = static_library('giomm-int',
     giomm_used_built_cc_file_targets, giomm_extra_cc_files, built_dummy_h_file_target,
     version: glibmm_libversion,
     include_directories: extra_include_dirs,
     cpp_args: '-DGIOMM_BUILD=1',
     dependencies: giomm_build_dep,
     link_with: glibmm_library,
-    install: true,
+    install: false,
   )
 
   built_h_cc_dir = meson.current_build_dir()
@@ -350,45 +350,45 @@ else # not maintainer_mode
     install: false,
   )
 
-  giomm_def = []
-  giomm_extra_link_args = []
-  extra_giomm_objects = []
-
-  if is_msvc
-    giomm_def = custom_target('giomm.def',
-      output: 'giomm.def',
-      depends: gio_int_lib,
-      command: [ gendef,
-        '@OUTPUT@',
-        '@0@-@1@.dll'.format(giomm_pcname, glibmm_libversion.split('.')[0]),
-        gio_int_lib.full_path(),
-      ],
-      install: false,
-    )
-    giomm_extra_link_args = ['/def:@0@'.format(giomm_def.full_path())]
-  endif
+  built_h_cc_dir = src_untracked_giomm
 
-  # Build the .rc file for Windows builds and link to it
-  if is_host_windows
-    windows = import('windows')
-    giomm_res = windows.compile_resources(giomm_rc)
-    extra_giomm_objects += giomm_res
-  endif
+endif
 
-  giomm_library = library(giomm_pcname, extra_giomm_objects,
-    objects: gio_int_lib.extract_all_objects(),
-    version: glibmm_libversion,
-    dependencies: giomm_build_dep,
-    link_depends: giomm_def,
-    link_args: giomm_extra_link_args,
-    link_with: glibmm_library,
-    install: true,
-  )
+giomm_def = []
+giomm_extra_link_args = []
+extra_giomm_objects = []
 
-  built_h_cc_dir = src_untracked_giomm
+if is_msvc
+  giomm_def = custom_target('giomm.def',
+    output: 'giomm.def',
+    depends: gio_int_lib,
+    command: [ gendef,
+      '@OUTPUT@',
+      '@0@-@1@.dll'.format(giomm_pcname, glibmm_libversion.split('.')[0]),
+      gio_int_lib.full_path(),
+    ],
+    install: false,
+  )
+  giomm_extra_link_args = ['/def:@0@'.format(giomm_def.full_path())]
+endif
 
+# Build the .rc file for Windows builds and link to it
+if is_host_windows
+  windows = import('windows')
+  giomm_res = windows.compile_resources(giomm_rc)
+  extra_giomm_objects += giomm_res
 endif
 
+giomm_library = library(giomm_pcname, extra_giomm_objects,
+  objects: gio_int_lib.extract_all_objects(),
+  version: glibmm_libversion,
+  dependencies: giomm_build_dep,
+  link_depends: giomm_def,
+  link_args: giomm_extra_link_args,
+  link_with: glibmm_library,
+  install: true,
+)
+
 # Install built .h and _p.h files.
 meson.add_install_script(
   python3.path(), generate_binding_py, 'install_built_h_files',


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