diff --git a/.gitignore b/.gitignore index 14155c15..0fe2211c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ Makefile.in *.l[ao] *~ /INSTALL -/MSVC_Net201?/sigc.rc -/MSVC_Net201?/sigc++config.h +/MSVC_NMake/sigc.rc +/MSVC_NMake/sigc++config.h /aclocal.m4 /autom4te.cache/ /config.h @@ -23,3 +23,6 @@ Makefile.in /sigc++config.h /sigc++-*.pc /stamp-h? +untracked/build_scripts/ +untracked/docs/ +untracked/sigc++/ diff --git a/MSVC_NMake/Makefile.vc b/MSVC_NMake/Makefile.vc new file mode 100644 index 00000000..9798e0ac --- /dev/null +++ b/MSVC_NMake/Makefile.vc @@ -0,0 +1,64 @@ +# NMake Makefile for building libsigc++ on Windows using Visual Studio + +# The items below this line should not be changed, unless one is maintaining +# the NMake Makefiles. Customizations can be done in the following NMake Makefile +# portions (please see comments in the these files to see what can be customized): +# +# detectenv-msvc.mak +# config-msvc.mak + +!include detectenv-msvc.mak + +# Include the Makefile portions with the source listings +!include ..\sigc++\filelist.am + +# Include the Makefile portion that enables features based on user input +!include config-msvc.mak + +!if "$(VALID_CFGSET)" == "TRUE" + +# We need Visual Studio 2013 or later +!if $(VSVER) < 12 +VALID_MSC = FALSE +!else +VALID_MSC = TRUE +!endif + +!if "$(VALID_MSC)" == "TRUE" + +!ifdef GENERATE_VERSIONED_FILES +!include pkg-ver.mak +DO_REAL_GEN = 1 +!endif + +all: $(LIBSIGC_LIB) examples all-build-info + +# Include the Makefile portion to convert the source and header lists +# into the lists we need for compilation and introspection +!include create-lists-msvc.mak + +examples: $(libsigc_examples) + +tests: $(libsigc_tests) all-build-info + +benchmark: all $(libsigc_benchmark) all-build-info + +# Include the build rules for sources, DLLs and executables +!include generate-msvc.mak +!include build-rules-msvc.mak + +!include install.mak + +!else # "$(VALID_MSC)" == "TRUE" +all: + @echo You need Visual Studio 2013 or later. + +!endif # "$(VALID_MSC)" == "TRUE" + +!else # "$(VALID_CFGSET)" == "TRUE" +all: help + @echo You need to specify a valid configuration, via + @echo CFG=release or CFG=debug +!endif # "$(VALID_CFGSET)" == "TRUE" + +!include info-msvc.mak diff --git a/MSVC_NMake/README.txt b/MSVC_NMake/README.txt new file mode 100644 index 00000000..e523bb4c --- /dev/null +++ b/MSVC_NMake/README.txt @@ -0,0 +1,54 @@ +Instructions for building libsigc++ on Visual Studio +==================================================== +Building the libsigc++ on Windows is now supported using Visual Studio +versions 2013 or later in both 32-bit and 64-bit (x64) flavors, +via NMake Makefiles. Due to C++-11 usage, Visual Studio 2012 or +earlier is not supported. + +libsigc++ itself has no external dependencies, but building the +benchmark test program will require an installation of the Boost +C++ libraries. + +The following describes what items are built with the following +targets: + +-all (or no target specified): The libsigc++ DLL and the example programs. +-test: The libsigc++ DLL and the test programs. +-benchmark: The libsigc++ DLL and the benchmark program. +-prep-git-build: Prepare to build directly from a GIT checkout. You + will at least need PERL for this, and m4 if building from a + GIT checkout or when building after running the 'forceclean' + target. + +The following are instructions for performing such a build. A 'clean' target is +provided-it is recommended that one cleans the build and redo the build if any +configuration option changed. An 'install' target is provided to copy the +built items in their appropriate locations under $(PREFIX), which is described below. + +A 'forceclean' target is also provided to cover the actions under the target 'clean', +but also to remove any traces of the headers and sources that were generated. This +may be useful if one wants to re-generate the sources and headers from the m4 templates. + +Invoke the build by issuing the command: +nmake /f Makefile.vc CFG=[release|debug] [PREFIX=...] +where: + +CFG: Required. Choose from a release or debug build. Note that + all builds generate a .pdb file for each .dll and .exe built--this refers + to the C/C++ runtime that the build uses. + +PREFIX: Optional. Base directory of where the third-party headers, libraries + and needed tools can be found, i.e. headers in $(PREFIX)\include, + libraries in $(PREFIX)\lib and tools in $(PREFIX)\bin. If not + specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where + $(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and + $(X) is the short version of the Visual Studio used, as follows: + 2017: 15 + +Explanation of options, set by