diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-27 10:36:00 +0800 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-12-29 18:11:52 +0100 |
commit | abe3d02ba618431dd4ac6ac3e463727db1239084 (patch) | |
tree | ed8080022c984af6e1f46c9a987d2fd6e640647f | |
parent | 4caa717f4723d2e814c61c7be7d63791aabf2757 (diff) | |
download | sigc++-abe3d02ba618431dd4ac6ac3e463727db1239084.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 | 9 |
2 files changed, 10 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 3ab7c69..519e3cb 100644 --- a/sigc++/meson.build +++ b/sigc++/meson.build @@ -69,15 +69,24 @@ install_headers(functors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'functors') install_headers(tuple_utils_h_files, subdir: sigcxx_pcname / 'sigc++' / 'tuple-utils') 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 + extra_include_dirs = ['..'] sigcxx_library = library(sigcxx_pcname, source_cc_files, + extra_sigc_objects, version: sigcxx_libversion, include_directories: extra_include_dirs, cpp_args: extra_sigc_cppflags, |