Skip to content

Commit a23cdc4

Browse files
fanc999-1kjellahl
authored andcommitted
build: Drop _WINDLL from sigc++config.h.[in|meson|cmake]
...and add a new check macro LIBSIGCXX_STATIC, to use the appropriate macros to build and link against libsigc++. Drop this from the build files as well.
1 parent b0312f2 commit a23cdc4

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

MSVC_NMake/config-msvc.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DEBUG_SUFFIX = -d
1414
DEBUG_SUFFIX =
1515
!endif
1616

17-
LIBSIGCPP_DEFINES = /DSIGC_BUILD /D_WINDLL
17+
LIBSIGCPP_DEFINES = /DSIGC_BUILD
1818

1919
SIGCPP_BASE_CFLAGS = /I.. /I. /I..\untracked\MSVC_NMake /std:c++17 /EHsc $(CFLAGS)
2020

sigc++/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ extra_sigc_objects = []
7474

7575
# Make sure we are exporting the symbols from the DLL
7676
if is_msvc
77-
extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL']
77+
extra_sigc_cppflags += ['-DSIGC_BUILD']
7878
endif
7979

8080
# Build the .rc file for Windows builds and link to it

sigc++config.h.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# if defined(_MSC_VER)
1717
# define SIGC_MSC 1
1818
# define SIGC_WIN32 1
19-
# define SIGC_DLL 1
19+
# ifndef LIBSIGCXX_STATIC
20+
# define SIGC_DLL 1
21+
# endif
2022
# elif defined(__CYGWIN__)
2123
# define SIGC_CONFIGURE 1
2224
# elif defined(__MINGW32__)
@@ -54,7 +56,7 @@
5456
#endif /* !SIGC_MSC */
5557

5658
#ifdef SIGC_DLL
57-
# if defined(SIGC_BUILD) && defined(_WINDLL)
59+
# ifdef SIGC_BUILD
5860
# define SIGC_API __declspec(dllexport)
5961
# elif !defined(SIGC_BUILD)
6062
# define SIGC_API __declspec(dllimport)

sigc++config.h.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
#if defined(_MSC_VER)
1717
#define SIGC_MSC 1
1818
#define SIGC_WIN32 1
19+
#ifndef LIBSIGCXX_STATIC
1920
#define SIGC_DLL 1
21+
#endif
2022
#elif defined(__CYGWIN__)
2123
#define SIGC_CONFIGURE 1
2224
#elif defined(__MINGW32__)
@@ -54,7 +56,7 @@
5456
#endif /* !SIGC_MSC */
5557

5658
#ifdef SIGC_DLL
57-
#if defined(SIGC_BUILD) && defined(_WINDLL)
59+
#ifdef SIGC_BUILD
5860
#define SIGC_API __declspec(dllexport)
5961
#elif !defined(SIGC_BUILD)
6062
#define SIGC_API __declspec(dllimport)

sigc++config.h.meson

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
#if defined(_MSC_VER)
2020
#define SIGC_MSC 1
2121
#define SIGC_WIN32 1
22+
#ifndef LIBSIGCXX_STATIC
2223
#define SIGC_DLL 1
24+
#endif
2325
#elif defined(__CYGWIN__)
2426
#define SIGC_CONFIGURE 1
2527
#elif defined(__MINGW32__)
@@ -57,7 +59,7 @@
5759
#endif /* !SIGC_MSC */
5860

5961
#ifdef SIGC_DLL
60-
#if defined(SIGC_BUILD) && defined(_WINDLL)
62+
#ifdef SIGC_BUILD
6163
#define SIGC_API __declspec(dllexport)
6264
#elif !defined(SIGC_BUILD)
6365
#define SIGC_API __declspec(dllimport)

0 commit comments

Comments
 (0)