diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-27 10:26:25 +0800 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-12-29 18:12:25 +0100 |
commit | 155ff459b9398248ec042194958edce82810c0fd (patch) | |
tree | a4f740e6139731804a025afa8876f5ce733a3bad | |
parent | f394ef6ee3a0df371b1f90652a321af50151348d (diff) | |
download | sigc++-155ff459b9398248ec042194958edce82810c0fd.tar.gz |
meson: Build Windows .rc files on Windows
This ensures that on Windows, the version info resources are indeed
linked into the libsigc++ DLL.
-rw-r--r-- | MSVC_NMake/meson.build | 2 | ||||
-rw-r--r-- | sigc++/meson.build | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/MSVC_NMake/meson.build b/MSVC_NMake/meson.build index e9964ca..510daa4 100644 --- a/MSVC_NMake/meson.build +++ b/MSVC_NMake/meson.build @@ -3,7 +3,7 @@ # Input: pkg_conf_data, project_build_root, python3 # Output: - -configure_file( +sigc_rc = configure_file( input: 'sigc.rc.in', output: '@BASENAME@', configuration: pkg_conf_data, diff --git a/sigc++/meson.build b/sigc++/meson.build index 101fb5d..731df06 100644 --- a/sigc++/meson.build +++ b/sigc++/meson.build @@ -93,12 +93,20 @@ src_untracked_sigcxx = project_source_root / untracked_sigcxx handle_built_files = project_source_root / 'tools' / 'handle-built-files.py' extra_sigc_cppflags = [] +extra_sigc_objects = [] # Make sure we are exporting the symbols from the DLL if is_msvc extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL'] endif +# Build the .rc file for Windows builds and link to it +if host_machine.system() == 'windows' + windows = import('windows') + sigc_res = windows.compile_resources(sigc_rc) + extra_sigc_objects += sigc_res +endif + if maintainer_mode # Maintainer mode. Generate .h and .cc files from .m4 files in macros/ directories. @@ -158,6 +166,7 @@ if maintainer_mode extra_include_dirs = ['..'] sigcxx_library = library(sigcxx_pcname, source_cc_files, built_cc_file_targets, built_h_file_targets, + extra_sigc_objects, version: sigcxx_libversion, cpp_args: extra_sigc_cppflags, include_directories: extra_include_dirs, @@ -200,6 +209,7 @@ else # not maintainer_mode extra_include_dirs = [ '..', '..' / 'untracked' ] sigcxx_library = library(sigcxx_pcname, source_cc_files, untracked_built_cc_files, + extra_sigc_objects, version: sigcxx_libversion, cpp_args: extra_sigc_cppflags, include_directories: extra_include_dirs, |