-DLOG4CXX_WCHAR_T=no |
Enable wchar_t API methods, choice of yes (default), no. |
-DLOG4CXX_UNICHAR=yes |
Enable UniChar API methods, choice of yes, no (default). |
-DLOG4CXX_CFSTRING=yes |
Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
-DBUILD_TESTING=off |
Do not build tests. Tests are built by default |
-DBUILD_SHARED_LIBS=off |
Build log4cxx as a static library. A dynamically linked log4cxx library is built by default. Any compilation unit that includes a log4cxx header must define LOG4CXX_STATIC. |
-DAPU_STATIC=yes |
Link to the APR-Util static library. By default, the log4cxx shared library is linked to the APR-Util shared library. If BUILD_SHARED_LIBS=off, the static APR-Util library is used. |
-DAPR_STATIC=yes |
Link to the APR static library. By default, the log4cxx shared library is linked to the APR shared library. If BUILD_SHARED_LIBS=off, the static APR library is always used. |
Building and testing log4cxx on a Microsoft Windows with APR, Expat and APR-Util built from source extracted into apr-1.7.0, libexpat(from github) and apr-util-1.6.1 in %HOMEPATH%\Libraries.
$ cd %HOMEPATH%\Libraries
$ cmake -S libexpat\expat -B buildtrees\expat -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
$ cmake --build buildtrees\expat --target install --config Release
$ cmake -S apr-1.7.0 -B buildtrees\apr -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
$ cmake --build buildtrees\apr --target install --config Release
$ set CMAKE_PREFIX_PATH=%HOMEPATH%\Libraries\installed
$ cmake -S apr-util-1.6.1 -B buildtrees\apr-util -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
$ cmake --build buildtrees\apr-util --target install --config Release
$ cmake -S apache-log4cxx-x.x.x -B buildtrees\log4cxx -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
$ cmake --build buildtrees\log4cxx --target install --config Release