• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

conan/H18-Feb-2022-13199

include/H18-Feb-2022-332186

.cvswrappersH A D18-Feb-202264 64

.gitignoreH A D18-Feb-2022127 1413

README.mdH A D18-Feb-20224.4 KiB10780

common.makH A D18-Feb-20225.8 KiB230184

common.vcxprojH A D18-Feb-20226.6 KiB148148

conan-build.pyH A D18-Feb-2022198 85

cyrus-sasl-all-in-one.slnH A D18-Feb-202210.6 KiB169167

cyrus-sasl-common.slnH A D18-Feb-20221.9 KiB4644

cyrus-sasl-core.slnH A D18-Feb-20228.6 KiB141139

cyrus-sasl-gssapiv2.slnH A D18-Feb-20222.7 KiB5654

cyrus-sasl-sasldb.slnH A D18-Feb-20223.7 KiB7270

cyrus-sasl.propsH A D18-Feb-20223.2 KiB7776

generate_conan.cmdH A D18-Feb-2022461 2117

init_auxprop.cH A D18-Feb-2022638 3631

init_mechanism.cH A D18-Feb-2022731 4135

install.vcxprojH A D18-Feb-20226.2 KiB133133

makeinit.ps1H A D18-Feb-20221.1 KiB2320

openssl.propsH A D18-Feb-2022538 1212

plugin_anonymous.vcxprojH A D18-Feb-20226.2 KiB134134

plugin_digestmd5.vcxprojH A D18-Feb-20226.4 KiB142142

plugin_gssapiv2.vcxprojH A D18-Feb-20228.3 KiB155155

plugin_login.vcxprojH A D18-Feb-20226.4 KiB134134

plugin_ntlm.vcxprojH A D18-Feb-20226.4 KiB142142

plugin_plain.vcxprojH A D18-Feb-20226.2 KiB134134

plugin_sasldb.vcxprojH A D18-Feb-20226.9 KiB143143

plugin_scram.vcxprojH A D18-Feb-20226.4 KiB142142

plugins.propsH A D18-Feb-2022943 2424

sasl2.vcxprojH A D18-Feb-20228.2 KiB176176

sasldb.propsH A D18-Feb-2022534 1212

sasldb.vcxprojH A D18-Feb-20228.8 KiB176176

vsinstall.cmdH A D18-Feb-20221.1 KiB3326

README.md

1# Microsoft Windows build scripts
2
3**Currently supported build systems:**
4
5* msbuild
6* nmake
7
8## msbuild
9
10msbuild or regular Microsoft Visual Studio solutions / projects are represented as
11\*.sln and \*.vcxproj files. The solution file is capable to build release or debug
12version of sasl2.dll. Sasl plugins are splitted into two sets. Some of them will be
13statically linked into sasl2.dll and others have separate solution files. This is
14done to simplify configuration and compilation with 3rdparty tools like Conan
15package manager. And there are some plugins which won't be compiled at all at the
16moment but may be support for them will be added later.
17
18There are 3 solution files:
19
20* **core** builds sasl2.dll with some static plugins included.
21* **sasldb** builds sasldb library and corresponding dynamic plugin
22* **gssapi** builds gssapi dynamic plugin
23
24**IMPORTANT:** Only x64 configuration was tested with current Visual Studio projects.
25
26#### Dependencies
27
28Pay attention to cyrus-sasl.props file and its SaslDependencyRoot property.
29It's where it's looking for dependencies. You can put your OpenSSL installation in there as well
30as any other dependency. Just make sure it's exacty in "lib" and "include" directories to make
31it compile
32
33**core** solution depends only on OpenSSL. You can change openssl.props file if putting
34OpenSSL into SaslDependencyRoot is not an option for you. In this case openssl.props may look
35something like this
36
37```xml
38<?xml version="1.0" encoding="utf-8"?>
39<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
40  <ImportGroup Label="PropertySheets" />
41  <PropertyGroup Label="UserMacros" />
42  <ItemDefinitionGroup>
43    <ClCompile>
44      <AdditionalIncludeDirectories>C:\path\to\openssl\install\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
45    </ClCompile>
46    <Link>
47      <AdditionalLibraryDirectories>C:\path\to\openssl\install\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
48      <AdditionalDependencies>libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
49    </Link>
50  </ItemDefinitionGroup>
51  <ItemGroup />
52</Project>
53```
54In any case it's required to point to the correct name of the OpenSSL library (see libeay32.lib).
55Also make sure previous values are preserved by including `%(something)` as in the example above.
56
57---
58
59**sasldb** solution depends on [LMDB](https://github.com/LMDB/lmdb) library. Again you can
60play with cyrus-sasl.props and its SaslDependencyRoot or just change paths and libs to
61whatever you want in [sasldb.props](sasldb.props). If the version from upstream repository doesn't build
62for you (even from stable branches), you can try next fork https://github.com/Ri0n/lmdb
63
64---
65
66**gssapiv2** plugin depends on one of Kerberos realization. But only MIT Kerberos was tested with msbuild.
67As always put dependencies to the location pointed by cyrus-sasl.props or change gssapiv2 project file.
68
69#### Compilation
70
71Basically there 3 ways to compile with msbuild.
72
731. Just open any of solution files in Visual Studio and build it (assuming the dependency are
74   already in correct locations)
752. Use msbuild command line util (pretty much the same as 1 but from command line)
763. Use [Conan package manager](https://conan.io) (will download dependencies from a cloud and build just cyrus-sasl.
77   Or after the sources will be built automatically on CI, so one can just download binaries)
78
79Regarding solution files there are to options:
80
811. cyrus-sasl-all-in-one.sln builds everything and depends on everything
822. cyrus-sasl-*.sln (other sln files) build something specific.
83  * cyrus-sasl-core.sln builds sasl2 library with some static plugins included
84  * cyrus-sasl-common.sln builds just common library useful for plugins development
85  * cyrus-sasl-sasldb.sln builds sasldb library and corresponding plugin
86  * cyrus-sasl-gssapiv2.sln builds gssapiv2 plugin
87
88Build with Conan is not that hard too. I need it installed and added to PATH,
89then from console in one of win32\conan subdirectory try something like
90
91```cmd
92> conan create . yourname/stable
93```
94For more information about Conan please read their
95[documentation](https://docs.conan.io/en/latest)
96
97#### Questions
98
99The Visual Studio solution, project files and property sheets were
100written by [Sergey Ilinykh](mailto:rion4ik@gmail.com).
101Feel free to mail and ask questions.
102
103## nmake
104
105TBD
106
107nmake makefiles weren't updated for awhile and most likely won't build.