Skip to content

Commit 9d82a2b

Browse files
fanc999-1kjellahl
authored andcommitted
build: Drop _WINDLL from sigc++config.h.[in|meson]
...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 48c88f6 commit 9d82a2b

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

MSVC_NMake/config-msvc.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DEBUG_SUFFIX =
1818
M4 = m4
1919
!endif
2020

21-
LIBSIGCPP_DEFINES = /DSIGC_BUILD /D_WINDLL
21+
LIBSIGCPP_DEFINES = /DSIGC_BUILD
2222

2323
SIGCPP_BASE_CFLAGS = \
2424
/Ivs$(VSVER)\$(CFG)\$(PLAT)\sigc \

sigc++/meson.build

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

7171
# Make sure we are exporting the symbols from the DLL
7272
if is_msvc
73-
extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL']
73+
extra_sigc_cppflags += ['-DSIGC_BUILD']
7474
endif
7575

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

sigc++config.h.in

Lines changed: 5 additions & 5 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__)
@@ -72,12 +74,10 @@
7274
#endif /* !SIGC_MSC */
7375

7476
#ifdef SIGC_DLL
75-
# if defined(SIGC_BUILD) && defined(_WINDLL)
77+
# ifdef SIGC_BUILD
7678
# define SIGC_API __declspec(dllexport)
77-
# elif !defined(SIGC_BUILD)
78-
# define SIGC_API __declspec(dllimport)
7979
# else
80-
# define SIGC_API
80+
# define SIGC_API __declspec(dllimport)
8181
# endif
8282
#else /* !SIGC_DLL */
8383
# define SIGC_API

sigc++config.h.meson

Lines changed: 5 additions & 5 deletions
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-
# define SIGC_DLL 1
22+
# ifndef LIBSIGCXX_STATIC
23+
# define SIGC_DLL 1
24+
# endif
2325
# elif defined(__CYGWIN__)
2426
# define SIGC_CONFIGURE 1
2527
# elif defined(__MINGW32__)
@@ -75,12 +77,10 @@
7577
#endif /* !SIGC_MSC */
7678

7779
#ifdef SIGC_DLL
78-
# if defined(SIGC_BUILD) && defined(_WINDLL)
80+
# ifdef SIGC_BUILD
7981
# define SIGC_API __declspec(dllexport)
80-
# elif !defined(SIGC_BUILD)
81-
# define SIGC_API __declspec(dllimport)
8282
# else
83-
# define SIGC_API
83+
# define SIGC_API __declspec(dllimport)
8484
# endif
8585
#else /* !SIGC_DLL */
8686
# define SIGC_API

0 commit comments

Comments
 (0)