doc: updated README[.md]

This commit is contained in:
Günter Obiltschnig 2024-04-03 17:21:05 +02:00
parent 10c3039398
commit 931dfeae6d
2 changed files with 43 additions and 39 deletions

64
README
View File

@ -25,12 +25,12 @@ build/ the build system for Unix and additional utility scri
cmake/ Support files for CMake cmake/ Support files for CMake
bin/ all executables (dynamic link libraries on Windows) bin/ all executables (dynamic link libraries on Windows)
bin64/ all 64-bit executables (and DLLs) bin64/ 64-bit executables (and DLLs) on Windows
doc/ additional documentation doc/ additional documentation
lib/ all libraries (import libraries on Windows) lib/ all libraries (import libraries on Windows)
lib64/ all 64-bit libraries lib64/ 64-bit libraries on Windows
CppUnit/ project and make/build files for the CppUnit unit testing framework CppUnit/ project and make/build files for the CppUnit unit testing framework
doc/ additional documentation doc/ additional documentation
@ -79,7 +79,7 @@ DOCUMENTATION
============= =============
Plenty of documentation (tutorial slides, articles and SDK reference) Plenty of documentation (tutorial slides, articles and SDK reference)
is available at <http://pocoproject.org/documentation/>. is available at <https://docs.pocoproject.org/>.
EXTERNAL DEPENDENCIES EXTERNAL DEPENDENCIES
@ -88,16 +88,18 @@ EXTERNAL DEPENDENCIES
The following libraries require third-party software (header files and The following libraries require third-party software (header files and
libraries) being installed to build properly: libraries) being installed to build properly:
- NetSSL_OpenSSL and Crypt require OpenSSL. - NetSSL_OpenSSL, Crypt and JWT require OpenSSL.
- Data/ODBC requires ODBC - Data/ODBC requires ODBC
(Microsoft ODBC on Windows, unixODBC or iODBC on Unix/Linux) (Microsoft ODBC on Windows, unixODBC or iODBC on Unix/Linux)
- Data/MySQL requires the MySQL client. - Data/MySQL requires the MySQL or MariaDB client library.
- Data/PostgreSQL requires the PostgreSQL client library (libpq).
Most Unix/Linux systems already have OpenSSL preinstalled. If your system Most Unix/Linux systems already have OpenSSL preinstalled. If your system
does not have OpenSSL, please get it from http://www.openssl.org or does not have OpenSSL, please get it from https://www.openssl.org or
another source. You do not have to build OpenSSL yourself - a binary another source. You do not have to build OpenSSL yourself - a binary
distribution is fine (e.g., apt-get install openssl libssl-dev). distribution is fine (e.g., apt-get install openssl libssl-dev).
On macOS, install OpenSSL via Homebrew (brew install openssl). On macOS, install OpenSSL via Homebrew (brew install openssl).
On Windows, OpenSSL can be installed with vcpkg.
The easiest way to install OpenSSL on Windows is to get the pre-built The easiest way to install OpenSSL on Windows is to get the pre-built
libraries from the pocoproject/openssl Git repository at libraries from the pocoproject/openssl Git repository at
@ -110,12 +112,6 @@ Depending on where you have installed the OpenSSL libraries,
you might have to edit the build script (buildwin.cmd), or add the you might have to edit the build script (buildwin.cmd), or add the
necessary paths to the INCLUDE and LIB environment variables. necessary paths to the INCLUDE and LIB environment variables.
Through the Poco/Crypto/Crypto.h and Poco/Net/NetSSL.h header files,
Visual C++ will automatically link the libcrypto.lib and libssl.lib
libraries. If your OpenSSL libraries are named differently, compile
with the macro POCO_EXTERNAL_OPENSSL defined and edit the project
files accordingly.
The Data library requires ODBC support on your system if you want The Data library requires ODBC support on your system if you want
to build the ODBC connector (which is the default). On Windows to build the ODBC connector (which is the default). On Windows
platforms, ODBC should be readily available if you have the platforms, ODBC should be readily available if you have the
@ -151,9 +147,9 @@ described in the following.
BUILDING - USING VCPKG BUILDING - USING VCPKG
=================== ======================
You can download and install poco using the vcpkg(https://github.com/Microsoft/vcpkg) You can download and install poco using the vcpkg (https://vcpkg.io)
dependency manager: dependency manager:
$ git clone https://github.com/Microsoft/vcpkg.git $ git clone https://github.com/Microsoft/vcpkg.git
@ -162,7 +158,7 @@ $ ./bootstrap-vcpkg.sh
$ ./vcpkg integrate install $ ./vcpkg integrate install
$ ./vcpkg install poco $ ./vcpkg install poco
The poco port in vcpkg is kept up to date by Microsoft team members and community contributors. The Poco port in vcpkg is kept up to date by Microsoft team members and community contributors.
If the version is out of date, please create an issue or pull request(https://github.com/Microsoft/vcpkg) If the version is out of date, please create an issue or pull request(https://github.com/Microsoft/vcpkg)
on the vcpkg repository. on the vcpkg repository.
@ -189,26 +185,26 @@ on the Conan Center Index repository.
BUILDING ON WINDOWS BUILDING ON WINDOWS
=================== ===================
Microsoft Visual Studio 2015 or newer is required to build the POCO C++ Libraries on Microsoft Visual Studio 2019 or newer is required to build the POCO C++ Libraries on
Windows platforms. Solution and project files for all versions from 2015 to 2022 are included. Windows platforms. Solution and project files for Visual Studio 2019 to 2022 are included.
64-bit (x64) builds are supported as well. 64-bit (x64) builds are supported as well.
You can either build from within Visual Studio (Build->Batch Build->Select All;Rebuild) You can either build from within Visual Studio (Build->Batch Build->Select All;Rebuild)
or from the command line. To build from the command line, start the or from the command line. To build from the command line, start the
Visual Studio Command Prompt and cd to the directory where you Developer PowerShell for Visual Studio and cd to the directory where you
have extracted the POCO C++ Libraries sources. Then, simply start the buildwin.cmd script have extracted the POCO C++ Libraries sources. Then, run the buildwin.ps1 script
and pass as argument the version of visual studio (140, 150, 160, 170, etc.). You can customize and pass the desired options.
what is being built by buildwin.cmd by passing appropriate command line arguments to
it. Call buildwin.cmd without arguments to see what is available.
To disable certain components (e.g., NetSSL_OpenSSL or Data/MySQL) from the build, To show available options, run:
edit the file named "components" and remove the respective lines.
> buildwin.ps1 -help
Example:
> buildwin.ps1 -vs 170 -action build -linkmode shared -config release -platform x64 -samples -tests
Certain libraries, like NetSSL_OpenSSL, Crypto or Data/MySQL have dependencies Certain libraries, like NetSSL_OpenSSL, Crypto or Data/MySQL have dependencies
to other libraries. Since the build script does not know where to find the necessary to other libraries. The Visual Studio project files have been configured to
header files and import libraries, you have to either add the header file paths to use vcpkg to install the required packages.
the INCLUDE environment variable and the library path to the LIB environment variable,
or you'll have to edit the buildwin.cmd script, where these environment variables can
be set as well.
In order to run the test suite and the samples, the top-most bin directory containing In order to run the test suite and the samples, the top-most bin directory containing
the shared libraries must be in the PATH environment variable. the shared libraries must be in the PATH environment variable.
@ -230,11 +226,11 @@ build and install it prior to building the POCO C++ Libraries.
You can check the version of GNU Make installed on your system with You can check the version of GNU Make installed on your system with
> gmake --version > make --version
or or
> make --version > gmake --version
Once you have GNU Make up and running, the rest is quite simple. Once you have GNU Make up and running, the rest is quite simple.
To extract the sources and build all libraries, testsuites and samples, simply To extract the sources and build all libraries, testsuites and samples, simply
@ -243,7 +239,7 @@ To extract the sources and build all libraries, testsuites and samples, simply
> tar -xf poco-X.Y.tar > tar -xf poco-X.Y.tar
> cd poco-X.Y > cd poco-X.Y
> ./configure > ./configure
> gmake -s > make -s
See the configure script source for a list of possible options. See the configure script source for a list of possible options.
For starters, we recommend --no-tests and --no-samples, to reduce build times. For starters, we recommend --no-tests and --no-samples, to reduce build times.
@ -254,7 +250,7 @@ Once you have successfully built POCO, you can install it
to /usr/local (or another directory specified as parameter to /usr/local (or another directory specified as parameter
to configure --prefix=<path>): to configure --prefix=<path>):
> sudo gmake -s install > sudo make -s install
You can omit certain components from the build. For example, you might You can omit certain components from the build. For example, you might
want to omit Data/ODBC or Data/MySQL if you do not have the corresponding want to omit Data/ODBC or Data/MySQL if you do not have the corresponding
@ -306,4 +302,4 @@ MORE INFORMATION
================ ================
For more information, see the POCO C++ Libraries website For more information, see the POCO C++ Libraries website
at <http://pocoproject.org>. at <https://pocoproject.org>.

View File

@ -30,7 +30,7 @@ and [Getting Started](https://pocoproject.org/docs/00200-GettingStarted.html) do
- MySQL, PostgreSQL and ODBC client libraries (optional) - MySQL, PostgreSQL and ODBC client libraries (optional)
Most Unix/Linux systems already have OpenSSL preinstalled. If your system Most Unix/Linux systems already have OpenSSL preinstalled. If your system
does not have OpenSSL, please get it from <http://www.openssl.org> or does not have OpenSSL, please get it from <https://www.openssl.org> or
another source. You do not have to build OpenSSL yourself - a binary another source. You do not have to build OpenSSL yourself - a binary
distribution is fine. For example, via Debian APT: distribution is fine. For example, via Debian APT:
@ -48,6 +48,7 @@ The easiest way to install OpenSSL on Windows is to use a binary
(prebuild) release, for example the one from Shining Light (prebuild) release, for example the one from Shining Light
Productions that comes with a Productions that comes with a
[Windows installer](https://www.slproweb.com/products/Win32OpenSSL.html). [Windows installer](https://www.slproweb.com/products/Win32OpenSSL.html).
OpenSSL can also be installed via the `vcpkg` package manager.
On Windows, POCO can also use the native Windows TLS APIs (SChannel). On Windows, POCO can also use the native Windows TLS APIs (SChannel).
@ -58,19 +59,19 @@ All dependencies can be installed with the following commands:
#### Debian Linux (including Ubuntu and Raspbian) #### Debian Linux (including Ubuntu and Raspbian)
``` ```
$ sudo apt-get -y update && sudo apt-get -y install git g++ make cmake libssl-dev $ sudo apt-get -y update && sudo apt-get -y install git g++ make cmake libssl-dev libmysqlclient-dev libpq-dev
``` ```
#### RedHat Linux #### RedHat Linux
``` ```
$ sudo yum install -y git gcc-c++ make cmake3 openssl-devel $ sudo yum install -y git gcc-c++ make cmake3 openssl-devel mysql-devel postgresql-devel
``` ```
#### macOS (with Homebrew) #### macOS (with Homebrew)
``` ```
$ brew install cmake openssl $ brew install cmake openssl mysql-client libpq
``` ```
### Building with CMake (Linux, macOS, Windows) ### Building with CMake (Linux, macOS, Windows)
@ -93,7 +94,13 @@ For example, if OpenSSL has been installed with Homebrew,
the `cmake` invocation becomes: the `cmake` invocation becomes:
``` ```
$ cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl $ cmake .. -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3
```
Similarly, the locations of other external libraries can be specified:
```
$ cmake .. -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3 -DMYSQL_ROOT_DIR=/opt/homebrew/opt/mysql-client -DPostgreSQL_ROOT_DIR=/opt/homebrew/opt/libpq
``` ```
Other common ways of building with CMake (e.g., `cmake-gui`) will also work. Other common ways of building with CMake (e.g., `cmake-gui`) will also work.
@ -139,6 +146,7 @@ The poco port in vcpkg is kept up to date by Microsoft team members and communit
If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg)
on the vcpkg repository. on the vcpkg repository.
#### Building and Installing - Using Conan #### Building and Installing - Using Conan
You can download and install poco using the Conan(https://github.com/conan-io/conan) You can download and install poco using the Conan(https://github.com/conan-io/conan)