Blame README.cmake

Packit 383869
Experimental cmake-based build support for APR-Util on Microsoft Windows
Packit 383869
Packit 383869
Status
Packit 383869
------
Packit 383869
Packit 383869
This build support is currently intended only for Microsoft Windows.
Packit 383869
Only Windows NT-based systems can be targeted.  (The traditional 
Packit 383869
Windows build support for APR can target Windows 9x as well.)
Packit 383869
Packit 383869
This build support is experimental.  Specifically,
Packit 383869
Packit 383869
* It does not support all features of APR-Util.
Packit 383869
* Some components may not be built correctly and/or in a manner
Packit 383869
  compatible with the previous Windows build support.
Packit 383869
* Build interfaces, such as the mechanisms which are used to enable
Packit 383869
  optional functionality or specify prerequisites, may change from
Packit 383869
  release to release as feedback is received from users and bugs and
Packit 383869
  limitations are resolved.
Packit 383869
Packit 383869
Important: Refer to the "Known Bugs and Limitations" section for further
Packit 383869
           information.
Packit 383869
Packit 383869
           It is beyond the scope of this document to document or explain
Packit 383869
           how to utilize the various cmake features, such as different
Packit 383869
           build backends or provisions for finding support libraries.
Packit 383869
Packit 383869
           Please refer to the cmake documentation for additional information
Packit 383869
           that applies to building any project with cmake.
Packit 383869
Packit 383869
Prerequisites
Packit 383869
-------------
Packit 383869
Packit 383869
The following tools must be in PATH:
Packit 383869
Packit 383869
* cmake, version 2.8 or later
Packit 383869
  cmake version 3.1.3 or later is required to work with current OpenSSL
Packit 383869
  releases.  (OpenSSL is an optional prerequisite of APR-Util.)
Packit 383869
* If using a command-line compiler: compiler and linker and related tools
Packit 383869
  (Refer to the cmake documentation for more information.)
Packit 383869
Packit 383869
The following support libraries are mandatory:
Packit 383869
Packit 383869
* APR 1.4.x or APR 1.5.x, built with cmake
Packit 383869
Packit 383869
Optional support libraries allow optional features of APR to be enabled:
Packit 383869
Packit 383869
* OpenSSL
Packit 383869
* many others potentially, though the build support isn't currently
Packit 383869
  implemented
Packit 383869
Packit 383869
How to build
Packit 383869
------------
Packit 383869
Packit 383869
1. cd to a clean directory for building (i.e., don't build in your
Packit 383869
   source tree)
Packit 383869
Packit 383869
2. Some cmake backends may want your compile tools in PATH.  (Hint: "Visual
Packit 383869
   Studio Command Prompt")
Packit 383869
Packit 383869
3. set CMAKE_LIBRARY_PATH=d:\path\to\prereq1\lib;d:\path\to\prereq2\lib;...
Packit 383869
Packit 383869
4. set CMAKE_INCLUDE_PATH=d:\path\to\prereq1\include;d:\path\to\prereq2\include;...
Packit 383869
Packit 383869
5. cmake -G "some backend, like 'NMake Makefiles'"
Packit 383869
     -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst
Packit 383869
     -DAPR-Util-specific-flags
Packit 383869
     d:/path/to/aprutilsource
Packit 383869
Packit 383869
   If APR 1.x was installed to a different directory than APR-Util,
Packit 383869
   also pass these additional arguments:
Packit 383869
Packit 383869
     -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include
Packit 383869
     -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib
Packit 383869
Packit 383869
   Alternately, use cmake-gui and update settings in the GUI.
Packit 383869
Packit 383869
   APR-Util feature flags:
Packit 383869
Packit 383869
       APU_HAVE_CRYPTO        Build crypt support (only the OpenSSL
Packit 383869
                              implementation is currently supported)
Packit 383869
                              Default: OFF
Packit 383869
       APU_HAVE_ODBC          Build ODBC DBD driver
Packit 383869
                              Default: ON
Packit 383869
       APR_BUILD_TESTAPR      Build APR-Util test suite
Packit 383869
                              Default: OFF
Packit 383869
       TEST_STATIC_LIBS       Build the test suite to test the APR static
Packit 383869
                              library instead of the APR dynamic library.
Packit 383869
                              Default: OFF
Packit 383869
                              In order to build the test suite against both
Packit 383869
                              static and dynamic libraries, separate builds
Packit 383869
                              will be required, one with TEST_STATIC_LIBS
Packit 383869
                              set to ON.
Packit 383869
       INSTALL_PDB            Install .pdb files if generated.
Packit 383869
                              Default: ON
Packit 383869
Packit 383869
   CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL
Packit 383869
Packit 383869
   CMAKE_BUILD_TYPE
Packit 383869
Packit 383869
       For NMake Makefiles the choices are at least DEBUG, RELEASE,
Packit 383869
       RELWITHDEBINFO, and MINSIZEREL
Packit 383869
       Other backends make have other selections.
Packit 383869
Packit 383869
6. build using chosen backend (e.g., "nmake install")
Packit 383869
Packit 383869
Known Bugs and Limitations
Packit 383869
--------------------------
Packit 383869
Packit 383869
* If include/apu.h or other generated files have been created in the source
Packit 383869
  directory by another build system, they will be used unexpectedly and
Packit 383869
  cause the build to fail.
Packit 383869
* Options should be provided for remaining features, along with finding any
Packit 383869
  necessary libraries
Packit 383869
  + DBM:
Packit 383869
    . APU_HAVE_GDBM
Packit 383869
    . APU_HAVE_NDBM
Packit 383869
    . APU_HAVE_DB
Packit 383869
  + DBD:
Packit 383869
    . APU_HAVE_PGSQL
Packit 383869
    . APU_HAVE_MYSQL
Packit 383869
    . APU_HAVE_SQLITE3
Packit 383869
    . APU_HAVE_SQLITE2
Packit 383869
    . APU_HAVE_ORACLE
Packit 383869
  + CRYPTO:
Packit 383869
    . APU_HAVE_NSS
Packit 383869
  + XLATE, APU_HAVE_ICONV (no way to consume an apr-iconv build yet)
Packit 383869
* Static builds of APR modules are not supported.
Packit 383869
* CHANGES/LICENSE/NOTICE is not installed, unlike Makefile.win.
Packit 383869
  (But unlike Makefile.win we want to call them APR-Util-CHANGES.txt
Packit 383869
  and so on.)  But perhaps that is a job for a higher-level script.
Packit 383869
Packit 383869
Generally:
Packit 383869
Packit 383869
* Many APR-Util features have not been tested with this build.
Packit 383869
* Developers need to examine the existing Windows build in great detail and see
Packit 383869
  what is missing from the cmake-based build, whether a feature or some build
Packit 383869
  nuance.
Packit 383869
* Any feedback you can provide on your experiences with this build will be
Packit 383869
  helpful.