Initial packaging of apr-1.5.0.
[profile/ivi/apr.git] / README.cmake
1 Experimental cmake-based build support for APR on Microsoft Windows
2
3 Status
4 ------
5
6 This build support is currently intended only for Microsoft Windows.
7
8 This build support is experimental.  Specifically,
9
10 * It does not support all features of APR.
11 * Some components may not be built correctly and/or in a manner
12   compatible with the previous Windows build support.
13 * Build interfaces, such as the mechanisms which are used to enable
14   optional functionality or specify prerequisites, may change from
15   release to release as feedback is received from users and bugs and
16   limitations are resolved.
17
18 Important: Refer to the "Known Bugs and Limitations" section for further
19            information.
20
21            It is beyond the scope of this document to document or explain
22            how to utilize the various cmake features, such as different
23            build backends or provisions for finding support libraries.
24
25            Please refer to the cmake documentation for additional information
26            that applies to building any project with cmake.
27
28 Prerequisites
29 -------------
30
31 The following tools must be in PATH:
32
33 * cmake, version 2.8 or later
34 * If using a command-line compiler: compiler and linker and related tools
35   (Refer to the cmake documentation for more information.)
36
37 How to build
38 ------------
39
40 1. cd to a clean directory for building (i.e., don't build in your
41    source tree)
42
43 2. Some cmake backends may want your compile tools in PATH.  (Hint: "Visual
44    Studio Command Prompt")
45
46 3. cmake -G "some backend, like 'NMake Makefiles'"
47      -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst
48      -DAPR-specific-flags
49      d:/path/to/aprsource
50
51    Alternately, use cmake-gui and update settings in the GUI.
52
53    APR feature flags:
54
55        APR_INSTALL_PRIVATE_H  Install extra .h files which are required when
56                               building httpd and Subversion but which aren't
57                               intended for use by applications.
58                               Default: OFF
59        APR_HAVE_IPV6          Enable IPv6 support
60                               Default: ON
61        APR_BUILD_TESTAPR      Build APR test suite
62                               Default: OFF
63        TEST_STATIC_LIBS       Build the test suite to test the APR static
64                               library instead of the APR dynamic library.
65                               Default: OFF
66                               In order to build the test suite against both
67                               static and dynamic libraries, separate builds
68                               will be required, one with TEST_STATIC_LIBS
69                               set to ON.
70        MIN_WINDOWS_VER        Minimum Windows version supported by this build
71                               (This controls the setting of _WIN32_WINNT.)
72                               "Vista" or "Windows7" or a numeric value like
73                               "0x0601"
74                               Default: "Vista"
75                               For desktop/server equivalence or other values,
76                               refer to
77                               http://msdn.microsoft.com/en-us/library/windows/
78                               desktop/aa383745(v=vs.85).aspx
79        INSTALL_PDB            Install .pdb files if generated.
80                               Default: ON
81
82    CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL
83
84    CMAKE_BUILD_TYPE
85
86        For NMake Makefiles the choices are at least DEBUG, RELEASE,
87        RELWITHDEBINFO, and MINSIZEREL
88        Other backends make have other selections.
89
90 4. build using chosen backend (e.g., "nmake install")
91
92 Known Bugs and Limitations
93 --------------------------
94
95 * If include/apr.h or other generated files have been created in the source
96   directory by another build system, they will be used unexpectedly and
97   cause the build to fail.
98 * Options should be provided for remaining features:
99   + APR_POOL_DEBUG
100 * APR-CHANGES.txt, APR-LICENSE.txt, and APR-NOTICE.txt are not installed,
101   though perhaps that is a job for a higher-level script.
102
103 Generally:
104
105 * Many APR features have not been tested with this build.
106 * Developers need to examine the existing Windows build in great detail and see
107   what is missing from the cmake-based build, whether a feature or some build
108   nuance.
109 * Any feedback you can provide on your experiences with this build will be
110   helpful.