Skip to content

Commit a064106

Browse files
fanc999-1kjellahl
authored andcommitted
sigc++.pc.in: Set -DLIBSIGCXX_STATIC in cxxflags as needed
Update the Meson build files to put in -DLIBSIGCXX_STATIC when we are building a static build of libsigc++. For the autotools build, this is not used.
1 parent 8c796cd commit a064106

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ AS_IF([test "x$enable_benchmark" = xyes],[
8383
AX_BOOST_TIMER
8484
])
8585

86+
AC_SUBST(MSVC_STATIC_CXXFLAG, '')
87+
8688
AC_CONFIG_FILES([Makefile
8789
${SIGCXX_MODULE_NAME}.pc:sigc++.pc.in
8890
${SIGCXX_MODULE_NAME}-uninstalled.pc:sigc++-uninstalled.pc.in

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ add_project_arguments(warning_flags, language: 'cpp')
189189

190190
# MSVC: Ignore warnings that aren't really harmful, but make those
191191
# that should not be overlooked stand out.
192+
static_cxxflag = '-DLIBSIGCXX_STATIC'
192193
if is_msvc
193194
disable_warnings_list = [
194195
'/EHsc', # avoid warnings caused by exception handling model used
@@ -213,7 +214,7 @@ if is_msvc
213214
language: 'cpp'
214215
)
215216
if is_msvc_static
216-
add_project_arguments(['-DLIBSIGCXX_STATIC'], language: 'cpp')
217+
add_project_arguments(static_cxxflag, language: 'cpp')
217218
endif
218219
endif
219220

@@ -243,6 +244,7 @@ foreach conf_test : ['gcc_template_specialization_operator_overload',
243244
pkg_conf_data.set('SIGC_' + conf_test.to_upper(), true)
244245
endif
245246
endforeach
247+
pkg_conf_data.set('MSVC_STATIC_CXXFLAG', is_msvc_static ? static_cxxflag : '')
246248

247249
configure_file(
248250
input: 'sigc++.pc.in',

sigc++.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Description: Typesafe signal and callback system for C++
1515
Version: @PACKAGE_VERSION@
1616
URL: https://libsigcplusplus.github.io/libsigcplusplus/
1717
Libs: -L${libdir} -lsigc-@SIGCXX_API_VERSION@
18-
Cflags: -I${includedir}/sigc++-@SIGCXX_API_VERSION@ -I${libdir}/sigc++-@SIGCXX_API_VERSION@/include
18+
Cflags: -I${includedir}/sigc++-@SIGCXX_API_VERSION@ -I${libdir}/sigc++-@SIGCXX_API_VERSION@/include @MSVC_STATIC_CXXFLAG@

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy