Skip to content

Commit abe3d02

Browse files
fanc999-1kjellahl
authored andcommitted
meson: Build Windows .rc files on Windows
This ensures that on Windows, the version info resources are indeed linked into the libsigc++ DLL.
1 parent 4caa717 commit abe3d02

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

MSVC_NMake/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Input: pkg_conf_data, project_build_root, python3
44
# Output: -
55

6-
configure_file(
6+
sigc_rc = configure_file(
77
input: 'sigc.rc.in',
88
output: '@BASENAME@',
99
configuration: pkg_conf_data,

sigc++/meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,24 @@ install_headers(functors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'functors')
6969
install_headers(tuple_utils_h_files, subdir: sigcxx_pcname / 'sigc++' / 'tuple-utils')
7070

7171
extra_sigc_cppflags = []
72+
extra_sigc_objects = []
7273

7374
# Make sure we are exporting the symbols from the DLL
7475
if is_msvc
7576
extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL']
7677
endif
7778

79+
# Build the .rc file for Windows builds and link to it
80+
if host_machine.system() == 'windows'
81+
windows = import('windows')
82+
sigc_res = windows.compile_resources(sigc_rc)
83+
extra_sigc_objects += sigc_res
84+
endif
85+
7886
extra_include_dirs = ['..']
7987
sigcxx_library = library(sigcxx_pcname,
8088
source_cc_files,
89+
extra_sigc_objects,
8190
version: sigcxx_libversion,
8291
include_directories: extra_include_dirs,
8392
cpp_args: extra_sigc_cppflags,

0 commit comments

Comments
 (0)