From 307b69f1bf08b088f267bc0fad5ae014401fb8e9 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Tue, 27 Jun 2023 13:33:07 +0800 Subject: [PATCH 1/2] Visual Studio builds: Convert build docs to MarkDown Convert the README.txt to MarkDown format so that it is easier on the eye in terms of formatting, and update some of the info: * Note that although Visual Studio 2013 is supported to build libsigc++, but Visual Studio 2015 or later is likely needed to build packages that use libsigc++ * ARM64 is actually supported * Update info on build from GIT checkout. * Move the part on static builds as appropriate * Some other minor tweaks --- MSVC_NMake/MSVC-Builds.md | 70 +++++++++++++++++++++++++++++++++++++++ MSVC_NMake/README.txt | 58 -------------------------------- MSVC_NMake/filelist.am | 2 +- README.md | 2 +- 4 files changed, 72 insertions(+), 60 deletions(-) create mode 100644 MSVC_NMake/MSVC-Builds.md delete mode 100644 MSVC_NMake/README.txt diff --git a/MSVC_NMake/MSVC-Builds.md b/MSVC_NMake/MSVC-Builds.md new file mode 100644 index 00000000..9fd9e71f --- /dev/null +++ b/MSVC_NMake/MSVC-Builds.md @@ -0,0 +1,70 @@ +Instructions for building libsigc++ on Visual Studio += + +Building libsigc++ on Windows is now supported using Visual Studio +versions 2013 or later in both 32-bit and 64-bit (x64 and ARM64) flavors, +via NMake Makefiles. Due to `C++11` usage, Visual Studio 2012 or +earlier is not supported, and packages using libsigc++ may require Visual +Studio 2015 or later as C++-11 is supported more comprehensively in later +Visual Studio versions. + +libsigc++ itself has no external dependencies, but building the +benchmark test program will require an installation of the Boost +C++ libraries. + +Building with NMake +- +The following describes what items are built with the following +targets: + +* `all`, `examples`: (or no target specified): The libsigc++ DLL and the example programs. +* `tests`: The libsigc++ DLL and the test programs. +* `benchmark`: The libsigc++ DLL and the benchmark program, the Boost C++ headers should be found in one of the paths that are in`%INCLUDE%`. + +Building directly from a GIT checkout is now supported, provided that a `PERL` +installation is present, along with the `m4` executable that can be optained +by installing CygWin or MSYS2 (add the location of your `m4` executable to the +end of your `%PATH%` and pass the `PERL` interpreter executable in your NMake +command line by using `nmake /f Makefile.vc ... PERL=`). + +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 also 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. + +* `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 and DLLs 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 (Intel/AMD) +builds or `arm64` for 64-bit (ARM) builds, and `$(X)` is the short version of the +Visual Studio used, as follows: + * 2013: `12` + * 2015: `14` + * 2017: `15` + * 2019: `16` + * 2022: `17` + +* Options, set by `