Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio: Support static builds (for libsigc++-2.x) #92

Merged
merged 6 commits into from
Jun 26, 2023

Conversation

fanc999-1
Copy link
Contributor

Hi,

This is the libsigc++-2.x counterpart for PR #91, to support static builds for Visual Studio. Like the 3.x/master counterpart, -Ddefault_library=both in Meson is not supported.

With blessings, thank you!

We need different defines/cflags for building static and shared builds of
libsigc++, so we can't really support default_library = 'both' for libsigc++
without much retinkering.

So, just disallow such builds at least for now.

Also, save up whether we are attempting a static build in the Visual Studio
build.
...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.
Apply -DLIBSIGCXX_STATIC as appropriate when we request a static build to be
done for the Meson and NMake builds, and skip building the version .rc file
if a static build is requested.

For the NMake builds, separate the build artifacts from the static and shared
builds.

The autotools builds since it is not used for Visual Studio builds at all.
Copy the built DLL and PDB only if building a shared build, and copy the
appropriate .lib file according to the build type.
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.
@fanc999-1 fanc999-1 changed the title Visual Studio: Support static builds Visual Studio: Support static builds (for libsigc++-2.x) Jun 26, 2023
@kjellahl kjellahl merged commit 13d183b into libsigcplusplus:libsigc++-2-12 Jun 26, 2023
@kjellahl kjellahl mentioned this pull request Jun 26, 2023
@fanc999-1 fanc999-1 deleted the msvc-static-2-12 branch June 27, 2023 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants