Skip to content

Commit 7d93629

Browse files
author
Ivan Zhakov
committed
* README: Document that CMake is only way to build APR on Windows.
Discussion: https://lists.apache.org/thread/xsth1r443kd6odz43pyyo4k0jdwgtvy3 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1934262 13f79535-47bb-0310-9956-ffa450edef68
1 parent 41a8592 commit 7d93629

1 file changed

Lines changed: 10 additions & 29 deletions

File tree

README

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -154,38 +154,19 @@ Resolve dependencies as appropriate.
154154
Configuring and Building APR on Windows
155155
=======================================
156156

157-
Using Visual Studio, you can build and run the test validation of APR.
158-
The Makefile.win make file has a bunch of documentation about it's
159-
options, but a trivial build is simply;
157+
APR uses CMake to build on Windows.
160158

161-
nmake -f Makefile.win
162-
nmake -f Makefile.win PREFIX=c:\desired\path\of\apr install
159+
Using command line:
160+
cmake -B out/build -G Ninja -DCMAKE_INSTALL_PREFIX=out/install
161+
cmake --build out/build
162+
cmake --install out/build
163163

164-
Note you must manually modify the include\apr.hw file before you
165-
build to change default options, see the #define APR_HAS_... or the
166-
#define APR_HAVE_... statements. Be careful, many of these aren't
167-
appropriate to be modified. The most common change is
168-
169-
#define APR_HAVE_IPV6 1
170-
171-
rather than 0 if this build of APR will be used strictly on machines
172-
with the IPv6 adapter support installed.
173-
174-
It's trivial to include the apr.dsp (for a static library) or the
175-
libapr.dsp (for a dynamic library) in your own build project, or you
176-
can load apr.dsw in Visual Studio 2002 (.NET) or later, which will
177-
convert these for you into apr.sln and associated .vcproj files.
178-
179-
When using APR as a dynamic library, nothing special is required,
180-
simply link to libapr-2.lib. To use it as a static library, simply
181-
define APR_DECLARE_STATIC before you include any apr header files
182-
in your source, and link to apr-2.lib instead.
183-
184-
On windows, selection of database drivers is via the environment values
185-
DBD_LIST (for mysql, oracle, pgsql, sqlite2 and/or sqlite3)
186-
and DBM_LIST (db and/or gdbm). DBD odbc and DBM sdbm are unconditionally
187-
compiled and installed, do not include these in the list.
164+
Using Visual Studio:
165+
1. Make sure that "C++ CMake tools for Windows" component is installed.
166+
2. Use Visual Studio Open Folder command to open APR source code directory.
167+
3. Use Build command to build APR
188168

169+
Please refer to README.cmake for more information about CMake options.
189170

190171
Generating Test Coverage information with gcc
191172
=============================================

0 commit comments

Comments
 (0)