Skip to content

Commit 364237e

Browse files
committed
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 CMake and autotools build, this is not used.
1 parent 84703ab commit 364237e

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ set (SIGCXX_MICRO_VERSION 0)
2323
set (SIGCXX_API_VERSION 3.0)
2424
set (PACKAGE_VERSION ${SIGCXX_MAJOR_VERSION}.${SIGCXX_MINOR_VERSION}.${SIGCXX_MICRO_VERSION})
2525
set (LIBSIGCPP_SOVERSION 0)
26+
set (MSVC_STATIC_CXXFLAG "")
2627

2728
option (SIGCXX_DISABLE_DEPRECATED "Disable deprecated" OFF)
2829

configure.ac

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

76+
AC_SUBST(MSVC_STATIC_CXXFLAG, '')
77+
7678
AC_CONFIG_FILES([Makefile
7779
${SIGCXX_MODULE_NAME}.pc:sigc++.pc.in
7880
${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
@@ -193,6 +193,7 @@ add_project_arguments(warning_flags, language: 'cpp')
193193

194194
# MSVC: Ignore warnings that aren't really harmful, but make those
195195
# that should not be overlooked stand out.
196+
static_cxxflag = '-DLIBSIGCXX_STATIC'
196197
if is_msvc
197198
disable_warnings_list = [
198199
'/EHsc', # avoid warnings caused by exception handling model used
@@ -217,7 +218,7 @@ if is_msvc
217218
language: 'cpp'
218219
)
219220
if is_msvc_static
220-
add_project_arguments(['-DLIBSIGCXX_STATIC'], language: 'cpp')
221+
add_project_arguments(static_cxxflag, language: 'cpp')
221222
endif
222223
endif
223224

@@ -239,6 +240,7 @@ endif
239240
pkg_conf_data.set('SIGCXX_MAJOR_VERSION', sigcxx_major_version)
240241
pkg_conf_data.set('SIGCXX_MINOR_VERSION', sigcxx_minor_version)
241242
pkg_conf_data.set('SIGCXX_MICRO_VERSION', sigcxx_micro_version)
243+
pkg_conf_data.set('MSVC_STATIC_CXXFLAG', is_msvc_static ? static_cxxflag : '')
242244

243245
configure_file(
244246
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