1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# sigc++
# Input: sigcxx_build_dep, sigcxx_pcname, sigcxx_libversion, install_includedir
# Output: source_h_files, sigcxx_dep
# There are no built source files in libsigc++-3.0.
source_cc_files = [
'connection.cc',
'signal_base.cc',
'trackable.cc',
'functors' / 'slot_base.cc',
]
sigc_h_files = [
'bind.h',
'bind_return.h',
'connection.h',
'limit_reference.h',
'member_method_trait.h',
'reference_wrapper.h',
'retype_return.h',
'signal.h',
'signal_base.h',
'slot.h',
'trackable.h',
'type_traits.h',
'visit_each.h',
'weak_raw_ptr.h',
]
adaptors_h_files = [
'adaptors' / 'adaptor_base.h',
'adaptors' / 'adaptors.h',
'adaptors' / 'adaptor_trait.h',
'adaptors' / 'adapts.h',
'adaptors' / 'bind.h',
'adaptors' / 'bind_return.h',
'adaptors' / 'bound_argument.h',
'adaptors' / 'compose.h',
'adaptors' / 'exception_catch.h',
'adaptors' / 'hide.h',
'adaptors' / 'retype.h',
'adaptors' / 'retype_return.h',
'adaptors' / 'track_obj.h',
'adaptors' / 'tuple_visitor_visit_each.h',
]
functors_h_files = [
'functors' / 'functor_trait.h',
'functors' / 'functors.h',
'functors' / 'mem_fun.h',
'functors' / 'ptr_fun.h',
'functors' / 'slot.h',
'functors' / 'slot_base.h',
]
tuple_utils_h_files = [
'tuple-utils' / 'tuple_cdr.h',
'tuple-utils' / 'tuple_end.h',
'tuple-utils' / 'tuple_for_each.h',
'tuple-utils' / 'tuple_start.h',
'tuple-utils' / 'tuple_transform_each.h',
]
source_h_files = sigc_h_files + adaptors_h_files + functors_h_files + tuple_utils_h_files
install_headers('sigc++.h', subdir: sigcxx_pcname / 'sigc++')
install_headers(sigc_h_files, subdir: sigcxx_pcname / 'sigc++')
install_headers(adaptors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'adaptors')
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,
dependencies: sigcxx_build_dep,
install: true,
)
# This is useful in the main project when libsigc++ is used as a subproject.
# It's also used when building example programs and test programs.
sigcxx_dep = declare_dependency(
link_with: sigcxx_library,
include_directories: extra_include_dirs,
dependencies: sigcxx_build_dep
)
|