| 1 |
/*! \page build Building CppDB |
| 2 |
|
| 3 |
\section req Requirements |
| 4 |
|
| 5 |
In order to build CppDB you need following: |
| 6 |
|
| 7 |
- <a href="http://www.cmake.org/">CMake</a> 2.6 and above |
| 8 |
- Decent C++ compiler like GCC, Intel or MSVC. |
| 9 |
- SQL library API you want to use: |
| 10 |
- Sqlite3 - the library and headers themselfs |
| 11 |
- MySQL - libmysqlclient |
| 12 |
- PostgreSQL - libpq |
| 13 |
- ODBC - unixodbc for POSIX operating systems and Window's build in odbc API for windows. |
| 14 |
|
| 15 |
\section opt Build Options |
| 16 |
|
| 17 |
Following CMake "ON", "OFF" options options provided for better customizability, all turned off by default: |
| 18 |
|
| 19 |
- DISABLE_SQLITE - don't build sqlite3 backend even if the library was found |
| 20 |
- SQLITE_BACKEND_INTERNAL - don't build a separate sqlite3 loadable module but rather build it into the cppdb library itself. |
| 21 |
- DISABLE_MYSQL - don't build mysql backend even if the mysqlclient library was found |
| 22 |
- MYSQL_BACKEND_INTERNAL - don't build a separate mysql loadable module but rather build it into the cppdb library itself. |
| 23 |
- DISABLE_PQ - don't build postgresql backend even if the libpq library was found |
| 24 |
- PQ_BACKEND_INTERNAL - don't build a separate postgresql loadable module but rather build it into the cppdb library itself. |
| 25 |
- DISABLE_ODBC - don't build odbc backend even if the odbc library was found |
| 26 |
- ODBC_BACKEND_INTERNAL - don't build a separate odbc loadable module but rather build it into the cppdb library itself. |
| 27 |
|
| 28 |
Additionally there is a \c LIBDIR option that allows to provide an install prefix for libraries on RH systems like: |
| 29 |
|
| 30 |
\code |
| 31 |
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=lib64 |
| 32 |
\endcode |
| 33 |
|
| 34 |
By default CMake would try to find the libraries and header files and would disable backends that do not |
| 35 |
have appropriate onces. |
| 36 |
|
| 37 |
If CMake fails to find the library or header you may provide the path explicitly using XXX_LIB and XXX_PATH variables |
| 38 |
were XXX is one of ODBC, SQLITE, PQ or MYSQL. |
| 39 |
|
| 40 |
By default Release with debug info version is build (unless you are using MSVC which by default builds debug version) |
| 41 |
|
| 42 |
\note MSVC Projects are not supported use "NMake Makefiles" generator to build CppDB with MSVC. |
| 43 |
|
| 44 |
\section bld Build Process |
| 45 |
|
| 46 |
-# Download latest version of CppDB or fetch one from SVN using subverision: |
| 47 |
\verbatim |
| 48 |
$ svn co http://cppcms.svn.sourceforge.net/svnroot/cppcms/cppdb/trunk cppdb-trunk |
| 49 |
\endverbatim |
| 50 |
-# Go to the created directory and make build directory and go to it. |
| 51 |
\verbatim |
| 52 |
$ cd cppdb-trunk |
| 53 |
$ mkdir build |
| 54 |
$ cd build |
| 55 |
\endverbatim |
| 56 |
-# Run cmake with all options you need and then make, make install |
| 57 |
\verbatim |
| 58 |
$ cmake -DCMAKE_INSTALL_PREFIX=/usr .. |
| 59 |
$ make |
| 60 |
# make install |
| 61 |
\endverbatim |
| 62 |
|
| 63 |
*/ |
| 64 |
|