mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 15:17:13 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
425
vendor/POCO/doc/00100-GuidedTour.page
vendored
Normal file
425
vendor/POCO/doc/00100-GuidedTour.page
vendored
Normal file
@ -0,0 +1,425 @@
|
||||
A Guided Tour Of The POCO C++ Libraries
|
||||
AAAIntroduction
|
||||
|
||||
!!! Introduction
|
||||
|
||||
The POCO C++ Libraries are a collection of open source C++
|
||||
class libraries that simplify and accelerate the development of
|
||||
network-centric, portable applications in C++. The libraries integrate
|
||||
perfectly with the C++ Standard Library and fill many of the functional
|
||||
gaps left open by it. Their modular and efficient design and
|
||||
implementation makes the POCO C++ Libraries extremely well suited
|
||||
for embedded development, an area where the C++ programming language is
|
||||
becoming increasingly popular, due to its suitability for both low-level
|
||||
(device I/O, interrupt handlers, etc.) and high-level object-oriented
|
||||
development. Of course, POCO is also ready for enterprise-level
|
||||
challenges.
|
||||
|
||||
<%
|
||||
<img src="images/poco.png" width="320" height="255" alt="POCO Libraries" border="0">
|
||||
%>
|
||||
|
||||
POCO consists of four core libraries, and a number of add-on libraries.
|
||||
The core libraries are Foundation, XML, Util and Net. Two of the add-on
|
||||
libraries are NetSSL, providing SSL support for the network classes in
|
||||
the Net library, and Data, a library for uniformly accessing different
|
||||
SQL databases. POCO aims to be for
|
||||
network-centric, cross-platform C++ software development what Apple's
|
||||
Cocoa is for Mac development, or Ruby on Rails is for Web development --
|
||||
a powerful, yet easy and fun to use platform to build your applications
|
||||
upon. POCO is built strictly using standard ANSI/ISO C++, including the
|
||||
standard library. The contributors attempt to find a good balance
|
||||
between using advanced C++ features and keeping the classes
|
||||
comprehensible and the code clean, consistent and easy to maintain.
|
||||
|
||||
|
||||
!!! The Foundation Library
|
||||
|
||||
The Foundation library makes up the heart of POCO. It contains the
|
||||
underlying platform abstraction layer, as well as frequently used
|
||||
utility classes and functions. The Foundation library contains types for
|
||||
fixed-size integers, functions for converting integers between byte
|
||||
orders, an Poco::Any class (based on <[boost::Any]>), utilities for error handling
|
||||
and debugging, including various exception classes and support for
|
||||
assertions. Also available are a number of classes for memory
|
||||
management, including reference counting based smart pointers, as well
|
||||
as classes for buffer management and memory pools. For string handling,
|
||||
POCO contains a number of functions that among other things, trim
|
||||
strings, perform case insensitive comparisons and case conversions.
|
||||
Basic support for Unicode text is also available in the form of classes
|
||||
that convert text between different character encodings, including UTF-8
|
||||
and UTF-16. Support for formatting and parsing numbers is there,
|
||||
including a typesafe variant of sprintf. Regular expressions based on
|
||||
the well-known PCRE library (http://www.pcre.org) are provided as well.
|
||||
|
||||
POCO gives you classes for handling dates and times in various variants.
|
||||
For accessing the file system, POCO has Poco::File and Poco::Path classes, as well as a
|
||||
Poco::DirectoryIterator class. In many applications, some parts of the
|
||||
application need to tell other parts that something has happened. In
|
||||
POCO, Poco::NotificationCenter, Poco::NotificationQueue and events (similar to C#
|
||||
events) make this easy. The following example shows how POCO events can be used. In
|
||||
this example, class <[Source]> has a public event named <[theEvent]>, having an
|
||||
argument of type int. Subscribers can subscribe by calling <[operator +=]>
|
||||
and unsubscribe by calling <[operator -=]>, passing a pointer to an object
|
||||
and a pointer to a member function. The event can be fired by calling
|
||||
<[operator ()]>, as its done in <[Source::fireEvent()]>.
|
||||
|
||||
#include "Poco/BasicEvent.h"
|
||||
#include "Poco/Delegate.h"
|
||||
#include <iostream>
|
||||
|
||||
using Poco::BasicEvent;
|
||||
using Poco::delegate;
|
||||
|
||||
class Source
|
||||
{
|
||||
public:
|
||||
BasicEvent<int> theEvent;
|
||||
|
||||
void fireEvent(int n)
|
||||
{
|
||||
theEvent(this, n);
|
||||
}
|
||||
};
|
||||
|
||||
class Target
|
||||
{
|
||||
public:
|
||||
void onEvent(const void* pSender, int& arg)
|
||||
{
|
||||
std::cout << "onEvent: " << arg << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Source source;
|
||||
Target target;
|
||||
|
||||
source.theEvent += delegate(&target, &Target::onEvent);
|
||||
|
||||
source.fireEvent(42);
|
||||
|
||||
source.theEvent -= delegate(&target, &Target::onEvent);
|
||||
|
||||
return 0;
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
The stream classes available in POCO have already been mentioned. These are
|
||||
augmented by Poco::BinaryReader and Poco::BinaryWriter for writing binary data to
|
||||
streams, automatically and transparently handling byte order issues.
|
||||
|
||||
In complex multithreaded applications, the only way to find problems or
|
||||
bugs is by writing extensive logging information. POCO provides a
|
||||
powerful and extensible logging framework that supports filtering,
|
||||
routing to different channels, and formatting of log messages. Log
|
||||
messages can be written to the console, a file, the Windows Event Log,
|
||||
the Unix syslog daemon, or to the network. If the channels provided by
|
||||
POCO are not sufficient, it is easy to extend the logging framework with
|
||||
new classes.
|
||||
|
||||
For loading (and unloading) shared libraries at runtime,
|
||||
POCO has a low-level Poco::SharedLibrary class. Based on it is the Poco::ClassLoader
|
||||
class template and supporting framework, allowing dynamic loading and
|
||||
unloading of C++ classes at runtime, similar to what's available to Java
|
||||
and .NET developers. The class loader framework also makes it a breeze
|
||||
to implement plug-in support for applications in a platform-independent
|
||||
way.
|
||||
|
||||
Finally, POCO Foundation contains multithreading abstractions at
|
||||
different levels. Starting with a Poco::Thread class and the usual
|
||||
synchronization primitives (Poco::Mutex, Poco::ScopedLock, Poco::Event,
|
||||
Poco::Semaphore, Poco::RWLock), a Poco::ThreadPool class and support for
|
||||
thread-local storage, also high level abstractions like active objects are
|
||||
available. Simply speaking, an active object is an object that has methods executing in
|
||||
their own thread. This makes asynchronous member function calls possible
|
||||
-- call a member function, while the function executes, do a bunch of
|
||||
other things, and, eventually, obtain the function's return value.
|
||||
The following example shows how this is done in POCO. The <[ActiveAdder]> class in
|
||||
defines an active method <[add()]>, implemented by the <[addImpl()]>
|
||||
member function. Invoking the active method in <[main()]> yields an
|
||||
Poco::ActiveResult (also known as a future), that eventually receives the
|
||||
function's return value.
|
||||
|
||||
#include "Poco/ActiveMethod.h"
|
||||
#include "Poco/ActiveResult.h"
|
||||
#include <utility>
|
||||
#include <iostream>
|
||||
|
||||
using Poco::ActiveMethod;
|
||||
using Poco::ActiveResult;
|
||||
|
||||
class ActiveAdder
|
||||
{
|
||||
public:
|
||||
ActiveAdder(): add(this, &ActiveAdder::addImpl)
|
||||
{
|
||||
}
|
||||
|
||||
ActiveMethod<int, std::pair<int, int>, ActiveAdder> add;
|
||||
|
||||
private:
|
||||
int addImpl(const std::pair<int, int>& args)
|
||||
{
|
||||
return args.first + args.second;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
ActiveAdder adder;
|
||||
|
||||
ActiveResult<int> sum = adder.add(std::make_pair(1, 2));
|
||||
// do other things
|
||||
sum.wait();
|
||||
std::cout << sum.data() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
!!! The XML Library
|
||||
|
||||
The POCO XML library provides support for reading, processing and
|
||||
writing XML. Following one's of POCO's guiding principles -- don't try to
|
||||
reinvent things that already work -- POCO's XML library supports the
|
||||
industry-standard SAX (version 2) and DOM interfaces, familiar
|
||||
to many developers with XML experience. SAX, the Simple API for XML
|
||||
(http://www.saxproject.org),
|
||||
defines an event-based interface for reading XML. A SAX-based XML parser
|
||||
reads through the XML document and notifies the application whenever it
|
||||
encounters an element, character data, or other XML artifact. A SAX
|
||||
parser does not need to load the complete XML document into memory, so
|
||||
it can be used to parse huge XML files efficiently. In contrast, DOM
|
||||
(Document Object Model, http://www.w3.org/DOM/) gives the application
|
||||
complete access to an XML
|
||||
document, using a tree-style object hierarchy. For this to work, the DOM
|
||||
parser provided by POCO has to load the entire document into memory. To
|
||||
reduce the memory footprint of the DOM document, the POCO DOM
|
||||
implementation uses string pooling, storing frequently occuring strings
|
||||
such as element and attribute names only once. The XML library is based
|
||||
on the Expat open source XML parser library (http://www.libexpat.org).
|
||||
Built on top of Expat
|
||||
are the SAX interfaces, and built on top of the SAX interfaces is the
|
||||
DOM implementation. For strings, the XML library uses <[std::string]>, with
|
||||
characters encoded in UTF-8. This makes interfacing the XML library to
|
||||
other parts of the application easy. Support for XPath and XSLT will be
|
||||
available in a future release.
|
||||
|
||||
|
||||
!!! The Util Library
|
||||
|
||||
The Util library has a somewhat misleading name, as it basically
|
||||
contains a framework for creating command-line and server applications.
|
||||
Included is support for handling command line arguments (validation,
|
||||
binding to configuration properties, etc.) and managing configuration
|
||||
information. Different configuration file formats are supported --
|
||||
Windows-style INI files, Java-style property files, XML files and the
|
||||
Windows registry.
|
||||
|
||||
For server applications, the framework provides
|
||||
transparent support for Windows services and Unix daemons. Every server
|
||||
application can be registered and run as a Windows service, with no
|
||||
extra code required. Of course, all server applications can still be
|
||||
executed from the command line, which makes testing and debugging easier.
|
||||
|
||||
|
||||
!!! The Net Library
|
||||
|
||||
POCO's Net library makes it easy to write network-based applications. No
|
||||
matter whether your application simply needs to send data over a plain
|
||||
TCP socket, or whether your application needs a full-fledged built-in
|
||||
HTTP server, you will find something useful in the Net library.
|
||||
|
||||
At the lowest level, the Net library contains socket classes, supporting TCP
|
||||
stream and server sockets, UDP sockets, multicast sockets, ICMP and raw
|
||||
sockets. If your application needs secure sockets, these are available
|
||||
in the NetSSL library, implemented using OpenSSL (http://www.openssl.org).
|
||||
Based on the socket classes are two frameworks for building TCP servers -- one for
|
||||
multithreaded servers (one thread per connection, taken from a thread
|
||||
pool), one for servers based on the Acceptor-Reactor pattern. The
|
||||
multithreaded Poco::Net::TCPServer class and its supporting framework are also the
|
||||
foundation for POCO's HTTP server implementation (Poco::Net::HTTPServer).
|
||||
On the client side, the Net library provides classes for talking to HTTP servers,
|
||||
for sending and receiving files using the FTP protocol, for sending mail
|
||||
messages (including attachments) using SMTP and for receiving mail from
|
||||
a POP3 server.
|
||||
|
||||
|
||||
!!! Putting It All Together
|
||||
|
||||
The following example shows the implementation of a simple HTTP server using the
|
||||
POCO libraries. The server returns a HTML document showing the current
|
||||
date and time. The application framework is used to build a server
|
||||
application that can run as a Windows service, or Unix daemon process.
|
||||
Of course, the same executable can also directly be started from the
|
||||
shell. For use with the HTTP server framework, a <[TimeRequestHandler]>
|
||||
class is defined that servers incoming requests by returning a HTML
|
||||
document containing the current date and time. Also, for each incoming
|
||||
request, a message is logged using the logging framework. Together with
|
||||
the <[TimeRequestHandler]> class, a corresponding factory class,
|
||||
<[TimeRequestHandlerFactory]> is needed; an instance of the factory is
|
||||
passed to the HTTP server object. The <[HTTPTimeServer]> application class
|
||||
defines a command line argument help by overriding the <[defineOptions()]>
|
||||
member function of Poco::Util::ServerApplication. It also reads in the default
|
||||
application configuration file (in <[initialize()]>) and obtains the value
|
||||
of some configuration properties in <[main()]>, before starting the HTTP
|
||||
server.
|
||||
|
||||
#include "Poco/Net/HTTPServer.h"
|
||||
#include "Poco/Net/HTTPRequestHandler.h"
|
||||
#include "Poco/Net/HTTPRequestHandlerFactory.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
#include "Poco/Net/HTTPServerRequest.h"
|
||||
#include "Poco/Net/HTTPServerResponse.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/DateTimeFormatter.h"
|
||||
#include "Poco/DateTimeFormat.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/ThreadPool.h"
|
||||
#include "Poco/Util/ServerApplication.h"
|
||||
#include "Poco/Util/Option.h"
|
||||
#include "Poco/Util/OptionSet.h"
|
||||
#include "Poco/Util/HelpFormatter.h"
|
||||
#include <iostream>
|
||||
|
||||
using Poco::Net::ServerSocket;
|
||||
using Poco::Net::HTTPRequestHandler;
|
||||
using Poco::Net::HTTPRequestHandlerFactory;
|
||||
using Poco::Net::HTTPServer;
|
||||
using Poco::Net::HTTPServerRequest;
|
||||
using Poco::Net::HTTPServerResponse;
|
||||
using Poco::Net::HTTPServerParams;
|
||||
using Poco::Timestamp;
|
||||
using Poco::DateTimeFormatter;
|
||||
using Poco::DateTimeFormat;
|
||||
using Poco::ThreadPool;
|
||||
using Poco::Util::ServerApplication;
|
||||
using Poco::Util::Application;
|
||||
using Poco::Util::Option;
|
||||
using Poco::Util::OptionSet;
|
||||
using Poco::Util::OptionCallback;
|
||||
using Poco::Util::HelpFormatter;
|
||||
|
||||
class TimeRequestHandler: public HTTPRequestHandler
|
||||
{
|
||||
public:
|
||||
TimeRequestHandler(const std::string& format): _format(format)
|
||||
{
|
||||
}
|
||||
|
||||
void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
|
||||
{
|
||||
Application& app = Application::instance();
|
||||
app.logger().information("Request from %s",
|
||||
request.clientAddress().toString());
|
||||
|
||||
Timestamp now;
|
||||
std::string dt(DateTimeFormatter::format(now, _format));
|
||||
|
||||
response.setChunkedTransferEncoding(true);
|
||||
response.setContentType("text/html");
|
||||
|
||||
std::ostream& ostr = response.send();
|
||||
ostr << "<html><head><title>HTTPTimeServer powered by "
|
||||
"POCO C++ Libraries</title>";
|
||||
ostr << "<meta http-equiv=\"refresh\" content=\"1\"></head>";
|
||||
ostr << "<body><p style=\"text-align: center; "
|
||||
"font-size: 48px;\">";
|
||||
ostr << dt;
|
||||
ostr << "</p></body></html>";
|
||||
}
|
||||
|
||||
private:
|
||||
std::string _format;
|
||||
};
|
||||
|
||||
class TimeRequestHandlerFactory: public HTTPRequestHandlerFactory
|
||||
{
|
||||
public:
|
||||
TimeRequestHandlerFactory(const std::string& format):
|
||||
_format(format)
|
||||
{
|
||||
}
|
||||
|
||||
HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
|
||||
{
|
||||
if (request.getURI() == "/")
|
||||
return new TimeRequestHandler(_format);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string _format;
|
||||
};
|
||||
|
||||
class HTTPTimeServer: public Poco::Util::ServerApplication
|
||||
{
|
||||
protected:
|
||||
void initialize(Application& self)
|
||||
{
|
||||
loadConfiguration();
|
||||
ServerApplication::initialize(self);
|
||||
}
|
||||
|
||||
void defineOptions(OptionSet& options)
|
||||
{
|
||||
ServerApplication::defineOptions(options);
|
||||
|
||||
options.addOption(
|
||||
Option("help", "h", "display argument help information")
|
||||
.required(false)
|
||||
.repeatable(false)
|
||||
.callback(OptionCallback<HTTPTimeServer>(
|
||||
this, &HTTPTimeServer::handleHelp)));
|
||||
}
|
||||
|
||||
void handleHelp(const std::string& name, const std::string& value)
|
||||
{
|
||||
HelpFormatter helpFormatter(options());
|
||||
helpFormatter.setCommand(commandName());
|
||||
helpFormatter.setUsage("OPTIONS");
|
||||
helpFormatter.setHeader(
|
||||
"A web server that serves the current date and time.");
|
||||
helpFormatter.format(std::cout);
|
||||
stopOptionsProcessing();
|
||||
_helpRequested = true;
|
||||
}
|
||||
|
||||
int main(const std::vector<std::string>& args)
|
||||
{
|
||||
if (!_helpRequested)
|
||||
{
|
||||
unsigned short port = static_cast<unsigned short>(
|
||||
config().getInt("HTTPTimeServer.port", 9980));
|
||||
std::string format(config().getString(
|
||||
"HTTPTimeServer.format",
|
||||
DateTimeFormat::SORTABLE_FORMAT));
|
||||
|
||||
ServerSocket svs(port);
|
||||
HTTPServer srv(
|
||||
new TimeRequestHandlerFactory(format),
|
||||
svs, new HTTPServerParams);
|
||||
srv.start();
|
||||
waitForTerminationRequest();
|
||||
srv.stop();
|
||||
}
|
||||
return Application::EXIT_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
bool _helpRequested = false;
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
HTTPTimeServer app;
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
----
|
639
vendor/POCO/doc/00200-GettingStarted.page
vendored
Normal file
639
vendor/POCO/doc/00200-GettingStarted.page
vendored
Normal file
@ -0,0 +1,639 @@
|
||||
Getting Started With The POCO C++ Libraries
|
||||
AAAIntroduction
|
||||
|
||||
!!!Welcome
|
||||
|
||||
Thank you for downloading the POCO C++ Libraries and welcome to the growing community of POCO C++ Libraries
|
||||
users. This document will help you in getting a smooth ride while installing and setting up the
|
||||
POCO C++ Libraries and going the first steps with the software.
|
||||
|
||||
|
||||
!!!Setting Up The POCO C++ Libraries
|
||||
|
||||
The POCO C++ Libraries are delivered in full source code only. Due to the
|
||||
large number of possible build configurations, no binary releases are provided
|
||||
from the project maintainers.
|
||||
This means that you have to build the libraries and tools before you can use them the first time.
|
||||
|
||||
<*Note: There are binary releases available as installation packages for
|
||||
various operating systems (e.g., Debian Linux, Ubuntu Linux, OpenBSD,
|
||||
OpenWRT, etc.). However, these packages are not maintained by the core
|
||||
team and may not always be up to date.*>
|
||||
|
||||
Up-to-date [[https://conan.io Conan]] packages are available via
|
||||
[[https://bintray.com/pocoproject/conan/Poco%3Apocoproject Bintray]].
|
||||
|
||||
|
||||
!!Source Code Distribution Format
|
||||
|
||||
The source code for the POCO C++ Libraries is delivered in a ZIP file
|
||||
for Windows users and/or in a compressed TAR file (.tar.gz or .tar.bz2)
|
||||
for Unix/Linux users. Both archives contain the same files, the only
|
||||
difference is that all text files in the ZIP files have line endings
|
||||
suitable for Windows (CR-LF), while the text files in the TAR file have
|
||||
line endings suitable for Unix/Linux (LF only).
|
||||
All libraries and tools follow a common convention for the directory
|
||||
layout. This directory layout is shown below.
|
||||
|
||||
build/ the build system for Unix and additional utility scripts
|
||||
config/ build configurations for various Unix platforms
|
||||
rules/ common build rules for all platforms
|
||||
scripts/ build and utility scripts
|
||||
vxconfig/ VxWorks build configurations
|
||||
|
||||
cmake/ Support files for CMake
|
||||
|
||||
bin/ all executables (dynamic link libraries on Windows)
|
||||
bin64/ all 64-bit executables (and DLLs)
|
||||
|
||||
doc/ additional documentation
|
||||
|
||||
lib/ all libraries (import libraries on Windows)
|
||||
lib64/ all 64-bit libraries
|
||||
|
||||
CppUnit/ project and make/build files for the CppUnit unit testing framework
|
||||
doc/ additional documentation
|
||||
include/
|
||||
CppUnit/ header files for CppUnit
|
||||
src/ source files for CppUnit
|
||||
WinTestRunner/ Windows GUI for CppUnit
|
||||
|
||||
Foundation/ project and make/build files for the Foundation library
|
||||
include/
|
||||
Poco/ header files for the Foundation library
|
||||
src/ source files for the Foundation library
|
||||
testsuite/ project and make/build files for the Foundation testsuite
|
||||
src/ source files for the Foundation testsuite
|
||||
bin/ test suite executables
|
||||
samples/ sample applications for the Foundation library
|
||||
|
||||
XML/ project and make/build files for the XML library
|
||||
include/
|
||||
Poco/
|
||||
XML/ header files for the core XML library
|
||||
SAX/ header files for SAX support
|
||||
DOM/ header files for DOM support
|
||||
src/ source files for the XML library
|
||||
testsuite/ project and make/build files for the XML testsuite
|
||||
src/ source files for the XML testsuite
|
||||
bin/ test suite executables
|
||||
samples/ sample applications for the XML library
|
||||
|
||||
Net/ project and make/build files for the Net library
|
||||
include/
|
||||
Poco/
|
||||
Net/ header files for the Net library
|
||||
src/ source files for the Net library
|
||||
testsuite/ project and make/build files for the Net testsuite
|
||||
src/ source files for the Net testsuite
|
||||
bin/ test suite executables
|
||||
samples/ sample applications for the Net library
|
||||
----
|
||||
|
||||
Depending on what package you have downloaded (Basic or Complete
|
||||
Edition), there may be other libraries as well (such as Data, Crypto,
|
||||
NetSSL_OpenSSL and Zip).
|
||||
|
||||
|
||||
!!External Dependencies
|
||||
|
||||
The following libraries require third-party software (header files and
|
||||
libraries) being installed to build properly:
|
||||
|
||||
- NetSSL_OpenSSL and Crypt require OpenSSL.
|
||||
- Data/ODBC requires ODBC
|
||||
(Microsoft ODBC on Windows, unixODBC or iODBC on Unix/Linux)
|
||||
- Data/MySQL requires the MySQL client.
|
||||
|
||||
|
||||
!OpenSSL
|
||||
|
||||
<*Unix/Linux*>
|
||||
|
||||
Most Unix/Linux systems already have OpenSSL
|
||||
preinstalled, or OpenSSL can be easily installed using the system’s
|
||||
package management facility. For example, on Ubuntu (or other
|
||||
Debian-based Linux distributions) you can type
|
||||
|
||||
$ sudo apt-get install openssl libssl-dev
|
||||
----
|
||||
|
||||
to install the necessary packages.
|
||||
If your system does not have OpenSSL, please get it from
|
||||
http://www.openssl.org/ or another source. You do not have to build
|
||||
OpenSSL yourself -- a binary distribution is fine.
|
||||
|
||||
On macOS, it's recommended to install OpenSSL via Homebrew.
|
||||
|
||||
$ brew install openssl
|
||||
----
|
||||
|
||||
|
||||
<*Windows*>
|
||||
|
||||
On Windows, there are three options:
|
||||
|
||||
- Use POCO pre-built OpenSSL binaries (simplest and recommended)
|
||||
- Build OpenSSL using scripts from POCO distribution package
|
||||
- Use a third-party pre-built OpenSSL
|
||||
|
||||
|
||||
<*POCO pre-built OpenSSL binaries*>
|
||||
|
||||
OpenSSL binaries (version 1.1.0) built with Visual Studio 2013 are available for
|
||||
[[https://github.com/pocoproject/openssl/tree/master/build download]].
|
||||
|
||||
In case you are using pre-built binaries, please make sure to copy the
|
||||
entire directory to <*C:\%POCO_BASE%\openssl\*>.
|
||||
|
||||
Or, %POCO_BASE%\openssl directory can be deleted (if existing) and POCO openssl
|
||||
github repository cloned into it:
|
||||
|
||||
$ cd %POCO_BASE%
|
||||
$ rmdir /s /q openssl
|
||||
$ git clone https://github.com/pocoproject/openssl
|
||||
|
||||
All libraries are located in their proper folders (eg. <*win64/bin/debug/*>),
|
||||
and all are named accordingly (<*libcrypto[mt[d]]*> and <*libssl[mt[d]]*>).
|
||||
|
||||
|
||||
<*Build OpenSSL using scripts from POCO distribution package*>
|
||||
|
||||
Alternatively, if you choose to build your own OpenSSL, POCO C++ Libraries
|
||||
distribution package comes with scripts to build OpenSSL on Windows operating
|
||||
system. This requires Windows PowerShell.
|
||||
|
||||
Usage:
|
||||
|
||||
C:\%POCO_BASE%\openssl\build.ps1 [-openssl_release 1.0.0 | 1.1.0]
|
||||
[-vs_version 150 | 140 | 120 | 110 | 100 | 90]
|
||||
[-config release | debug | both]
|
||||
[-platform Win32 | x64]
|
||||
[-library shared | static]
|
||||
----
|
||||
|
||||
Example: Building OpenSSL 1.1.0, DLL release build for x64 with Visual Studio 2015:
|
||||
|
||||
C:\%POCO_BASE%\openssl\build.ps1 -openssl_release 1.1.0 -vs_version 140 -config release -platform x64 -library shared
|
||||
----
|
||||
|
||||
The above command will download all the necessary packages (perl, nasm, etc)
|
||||
and build OpenSSL in <*C:\%POCO_BASE%\openssl\build*> directory; the built OpenSSL
|
||||
binaries can be linked from EXEs and DLLs built with Visual Studio 2015 to 2019.
|
||||
|
||||
Pre-generated POCO Visual Studio projects are configured to use headers and
|
||||
libraries from <*C:\%POCO_BASE%\openssl\build*> directory.
|
||||
|
||||
<*Use a third-party pre-built OpenSSL*>
|
||||
|
||||
Yet another way to install OpenSSL on Windows is to use a binary
|
||||
(prebuild) release, for example the one from Shining Light
|
||||
Productions that comes with a Windows installer
|
||||
(http://www.slproweb.com/products/Win32OpenSSL.html).
|
||||
Depending on where you have installed the OpenSSL libraries,
|
||||
you might have to edit the build script (buildwin.cmd), or add the
|
||||
necessary paths to the INCLUDE and LIB environment variables. You might also
|
||||
have to edit the project settings if the names of the OpenSSL libraries
|
||||
from your build differ from the names used in the project files.
|
||||
|
||||
|
||||
!ODBC
|
||||
|
||||
The Data library requires ODBC support on your system if you want to
|
||||
build the ODBC connector (which is the default). On Windows platforms,
|
||||
ODBC should be readily available if you have the Windows SDK installed.
|
||||
On Unix/Linux platforms, you can use [[http://www.iodbc.org/ iODBC]]
|
||||
or [[http://www.unixodbc.org/ unixODBC]. On
|
||||
Linux, use your distribution's package management system to install the
|
||||
necessary libraries and header files. For example, on Ubuntu, type
|
||||
|
||||
$ sudo apt-get install libiodbc2 libiodbc2-dev
|
||||
----
|
||||
|
||||
to install the iODBC library and header files.
|
||||
|
||||
The Data/ODBC and Data/MySQL Makefiles will search for the ODBC and
|
||||
MySQL headers and libraries in various places. Nevertheless, the
|
||||
Makefiles may not be able to find the headers and libraries. In this
|
||||
case, please edit the Makefile in Data/ODBC and/or Data/MySQL
|
||||
accordingly.
|
||||
|
||||
|
||||
!MySQL Client
|
||||
|
||||
The Data library requires the [[http://dev.mysql.com MySQL]] client
|
||||
libraries and header files if you want to build the MySQL connector
|
||||
(which is the default). On Windows platforms, use the MySQL client
|
||||
installer to install the necessary files. On Unix/Linux platforms, use
|
||||
the package management system of your choice to install the necessary
|
||||
files. Alternatively, you can of course build MySQL yourself from
|
||||
source.
|
||||
|
||||
|
||||
!!Building using CMake
|
||||
|
||||
As an alternative to the platform specific Makefiles and Solutions, CMake can be used
|
||||
to do build POCO C++ Libraries on any platform with any compiler. CMake is a meta build system and it
|
||||
generate native makefiles and workspaces that can be used in the compiler environment of
|
||||
your choice. For a quick overview see http://cgold.readthedocs.io/en/latest/overview/cmake-can.html
|
||||
|
||||
POCO C++ Libraries requires CMake 3.2 or higher. Static binaries for many platforms can be downloaded from http://www.cmake.org/
|
||||
|
||||
CMake supports out of source builds and this is the recommended way to build POCO C++ Libraries using CMake.
|
||||
|
||||
Assuming the POCO C++ Libraries source is located in /path/to/poco directory and you like to build POCO C++ Libraries just type the
|
||||
following commands (Command parameters are all the same on any platform).
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
This will build POCO C++ Libraries in a subdirectory <*poco-build*>. All files produced during build are located in this directory.
|
||||
|
||||
|
||||
!!!Some cmake basic parameters:
|
||||
|
||||
For Makefile (default on Unix systems) and Ninja based build system (and all other single-configuration generators), there exists following build types:
|
||||
* Debug
|
||||
* Release
|
||||
* RelWithDebInfo (Release build with Debug infos)
|
||||
* MinSizeRel (Release build with size optimisation)
|
||||
|
||||
As default, POCO is build RelWithDebInfo. See cmake output like:
|
||||
|
||||
...
|
||||
-- [cmake] Build type: RelWithDebInfo
|
||||
...
|
||||
|
||||
You can change this with following parameter: <*CMAKE_BUILD_TYPE=....*>
|
||||
|
||||
For example to build with debug symbols:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_BUILD_TYPE=Debug
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
|
||||
For multi-configuration generators, (like Visual Studio and Xcode), CMAKE_BUILD_TYPE is ignored!
|
||||
|
||||
For these you should set build type at build time:
|
||||
|
||||
For example to build with debug symbols:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build
|
||||
$ cmake --build /path/to/poco-build --config Debug
|
||||
|
||||
|
||||
Installation path of Poco is as defaults to /usr/local on UNIX and c:/Program Files/Poco on Windows.
|
||||
|
||||
You can change the path with following parameter: <*CMAKE_INSTALL_PREFIX=....*>
|
||||
|
||||
For example to install in /usr:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_INSTALL_PREFIX=/usr
|
||||
$ cmake --build /path/to/poco-build --install
|
||||
|
||||
This will install the poco libs in /usr/lib and the binaries in /usr/bin etc.
|
||||
|
||||
See also cmake output like:
|
||||
|
||||
....
|
||||
-- [cmake] Installation target path: /usr/local
|
||||
....
|
||||
|
||||
For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html?highlight=cmake_install_prefix
|
||||
|
||||
|
||||
To set libraries type, you can use following parameter: <*BUILD_SHARED_LIBS=[ON/OFF]*>
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DBUILD_SHARED_LIBS=OFF
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
As default, Poco build dynamic libraries, see cmake output like:
|
||||
...
|
||||
-- Building dynamic libraries
|
||||
...
|
||||
|
||||
|
||||
To set some additional compiler flags, you can use following parameters:
|
||||
|
||||
* CMAKE_C_FLAGS For C compiler
|
||||
* CMAKE_CXX_FLAGS For C++ compiler
|
||||
|
||||
For example:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_CXX_FLAGS=-fstack-protector
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
For default compile flags, see cmake output like:
|
||||
...
|
||||
-- [cmake] Build with cxx flags: -O2 -g -DNDEBUG
|
||||
-- [cmake] Build with c flags: -O2 -g -DNDEBUG
|
||||
...
|
||||
|
||||
For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_%3CLANG%3E_FLAGS
|
||||
|
||||
|
||||
To use the compiler of your choice, you can use following paramters:
|
||||
|
||||
* CMAKE_C_COMPILER C compiler
|
||||
* CMAKE_CXX_COMPILER C++ compiler
|
||||
|
||||
For example to use the clang compiler, execute following cmake command:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
To cross compile POCO C++ Libraries for another architecture/device you should have a <*cmake toolchain file*> and execute following command:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchainfile
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
See https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html for more information.
|
||||
|
||||
|
||||
!!!Poco special build parameters:
|
||||
|
||||
POCO C++ Libraries allows you to set some build time options. As an example: to disable the SevenZip support
|
||||
type the following command:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DENABLE_SEVENZIP=OFF
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
Here an overview of POCO build options:
|
||||
|
||||
* ENABLE_XML Set to OFF|ON (default is ON) to build XML support library
|
||||
* ENABLE_JSON Set to OFF|ON (default is ON) to build JSON support library
|
||||
* ENABLE_NET Set to OFF|ON (default is ON) to build Net support library
|
||||
* ENABLE_NETSSL Set to OFF|ON (default is ON) to build NetSSL support library (Need installed openssl libraries)
|
||||
* ENABLE_CRYPTO Set to OFF|ON (default is ON) to build Crypto support library (Need installed openssl libraries)
|
||||
* ENABLE_DATA Set to OFF|ON (default is ON) to build Data support library
|
||||
* ENABLE_DATA_SQLITE Set to OFF|ON (default is ON) to build Data SQlite support library
|
||||
* ENABLE_DATA_MYSQL Set to OFF|ON (default is ON) to build Data MySQL or MariaDB support library (Need installed MySQL or MariaDB client libraries)
|
||||
* ENABLE_DATA_POSTGRESQL Set to OFF|ON (default is ON) to build SQL PosgreSQL support library (Need installed PostgreSQL client libraries)
|
||||
* ENABLE_DATA_ODBC Set to OFF|ON (default is ON) to build Data ODBC support library (Need installed ODBC libraries)
|
||||
* ENABLE_MONGODB Set to OFF|ON (default is ON) to build MongoDB support library
|
||||
* ENABLE_REDIS Set to OFF|ON (default is ON) to build Redis support library
|
||||
* ENABLE_PDF Set to OFF|ON (default is OFF) to build PDF support library
|
||||
* ENABLE_UTIL Set to OFF|ON (default is ON) to build Util support library
|
||||
* ENABLE_ZIP Set to OFF|ON (default is ON) to build Zip support library
|
||||
* ENABLE_SEVENZIP Set to OFF|ON (default is OFF) to build SevenZip support library
|
||||
* ENABLE_APACHECONNECTOR Set to OFF|ON (default is ON) to build ApacheConnector support library (Need installed apache and apr libraries)
|
||||
* ENABLE_CPPPARSER Set to OFF|ON (default is OFF) to build C++ parser
|
||||
* ENABLE_ENCODINGS Set to OFF|ON (default is ON) to build with Encodings
|
||||
* ENABLE_ENCODINGS_COMPILER Set to OFF|ON (default is OFF) to build Encodings Compiler
|
||||
* ENABLE_PAGECOMPILER Set to OFF|ON (default is ON) to build PageCompiler
|
||||
* ENABLE_PAGECOMPILER_FILE2PAGE Set to OFF|ON (default is ON) to build File2Page
|
||||
* ENABLE_POCODOC Set to OFF|ON (default is OFF) to build Poco Documentation Generator
|
||||
* ENABLE_TESTS Set to OFF|ON (default is OFF) to build Unit tests
|
||||
* ENABLE_LONG_RUNNING_TESTS Set to OFF|ON (default is ON) to use long running test
|
||||
* POCO_UNBUNDLED Set to OFF|ON (default is OFF) to control linking dependencies as external
|
||||
|
||||
Windows only parameter:
|
||||
|
||||
* POCO_MT Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD
|
||||
* ENABLE_MSVC_MP Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC
|
||||
* ENABLE_NETSSL_WIN Set to OFF|ON (default is OFF) to build NetSSL support library(Need installed openssl libraries For Windows only)
|
||||
|
||||
You can also see and enable or disable available options execute following command:
|
||||
|
||||
$ cmake-gui /path/to/poco-build
|
||||
|
||||
or for console only:
|
||||
|
||||
$ ccmake /path/to/poco-build
|
||||
|
||||
POCO C++ Libraries options are prefixed with <*ENABLE_*>. (This will be changed in POCO 2.x.x to <*POCO_*>)
|
||||
|
||||
!!!Third-party library location
|
||||
|
||||
If a third-party library is not installed in a default location, cmake will fail to run.
|
||||
There exists following parameters to set additional search paths for cmake to find third-party libraries:
|
||||
|
||||
To find PostgreSQL:
|
||||
* PostgreSQL_ROOT_DIR - Set root installation path where to find include path and libraries of PostgreSQL
|
||||
or
|
||||
* PostgreSQL_ROOT_INCLUDE_DIRS - Set include paths where to find PostgreSQL headers
|
||||
* PostgreSQL_ROOT_LIBRARY_DIRS - Set library paths where to find PostgreSQL libraries
|
||||
|
||||
To find ODBC:
|
||||
* ODBC_ROOT_DIR - Set root installation path where to find include path and libraries of ODBC
|
||||
or
|
||||
* ODBC_ROOT_INCLUDE_DIRS - Set include paths where to find ODBC headers
|
||||
* ODBC_ROOT_LIBRARY_DIRS - Set library paths where to find ODBC libraries
|
||||
|
||||
To find MySQL or MariaDB:
|
||||
* MYSQL_ROOT_DIR - Set root installation path where to find include path and libraries of MySQL or MariaDB
|
||||
or
|
||||
* MYSQL_ROOT_INCLUDE_DIRS - Set include paths where to find MySQL or MariaDB headers
|
||||
* MYSQL_ROOT_LIBRARY_DIRS - Set library paths where to find MySQL or MariaDB libraries
|
||||
|
||||
* APRUTIL_ROOT_DIR - Set root installation path where to find include path and libraries of apr util
|
||||
or
|
||||
* APRUTIL_ROOT_INCLUDE_DIRS - Set include paths where to find apr util headers
|
||||
* APRUTIL_ROOT_LIBRARY_DIRS - Set library paths where to find apr util libraries
|
||||
|
||||
* APR_ROOT_DIR - Set root installation path where to find include path and libraries of apr
|
||||
or
|
||||
* APR_ROOT_INCLUDE_DIRS - Set include paths where to find apr headers
|
||||
* APR_ROOT_LIBRARY_DIRS - Set library paths where to find apr libraries
|
||||
|
||||
* APACHE2_ROOT_DIR - Set root installation path where to find include path and libraries of apache2
|
||||
or
|
||||
* APACHE2_ROOT_INCLUDE_DIRS - Set include paths where to find apache2 headers
|
||||
|
||||
|
||||
For example set installation path of MySQL:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DMYSQL_ROOT_DIR=/usr/local/mysql
|
||||
$ cmake --build /path/to/poco-build
|
||||
or
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DMYSQL_ROOT_INCLUDE_DIRS=/usr/local/mysql/include/mysql -DMYSQL_ROOT_LIBRARY_DIRS=/usr/local/lib/mysql
|
||||
$ cmake --build /path/to/poco-build
|
||||
|
||||
|
||||
|
||||
|
||||
!!!How to use POCO in your cmake project:
|
||||
|
||||
To use POCO C++ Libraries in your cmake project, add following line in your project for example to use crypto:
|
||||
|
||||
find_package(Poco REQUIRED PocoCrypto)
|
||||
....
|
||||
target_link_libraries(yourTargetName ... Poco::Crypto)
|
||||
|
||||
If you get an error like 'By not providing "FindPoco.cmake"', then you should set CMAKE_PREFIX_PATH to the installation directory of your POCO C++ Libraries. For example:
|
||||
|
||||
$ cmake -H/path/to/yourProject -B/path/to/yourProject-build -DCMAKE_PREFIX_PATH=/path/to/installationOf/poco
|
||||
|
||||
!!!Some other Hints:
|
||||
|
||||
For a faster build, use ninja as build system. See https://ninja-build.org/
|
||||
For example on Ubuntu execute following commands:
|
||||
|
||||
$ sudo apt-get install ninja-build
|
||||
|
||||
This install <*ninja*> command. To use ninja-build execute following cmake commands:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -GNinja
|
||||
$ cmake --build /path/to/poco-build --target all
|
||||
|
||||
See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html for other generators.
|
||||
|
||||
To enable verbose output from Makefile builds, execute following cmake commands:
|
||||
|
||||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
$ cmake --build /path/to/poco-build --target all
|
||||
|
||||
|
||||
Some more infos about cmake see:
|
||||
|
||||
$ cmake --help-full
|
||||
https://cmake.org/cmake/help/latest/
|
||||
http://cgold.readthedocs.io/en/latest/index.html
|
||||
|
||||
|
||||
!!Building On Windows
|
||||
|
||||
Microsoft Visual Studio 2015 or newer is required to build the
|
||||
POCO C++ Libraries on Windows platforms.
|
||||
Solution and project files for all versions are included.
|
||||
64-bit (x64) builds are supported as well.
|
||||
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 Visual Studio 2015 (or 2017, 2019, etc.) Command
|
||||
Prompt and go (<[cd]>) to the directory where you have extracted the POCO
|
||||
C++ Libraries sources. Then, simply start the <*buildwin.cmd*> script and
|
||||
pass as argument the version of Visual Studio (140, 150, 160). You
|
||||
can customize 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. Build environment is set up by the buildwin.cmd; to avoid
|
||||
build problems, it is recommended to start the build in a clean command
|
||||
prompt console, i.e. not in the one provided by Visual Studio for 32/64-bit
|
||||
builds (although those will work fine if used appropriately for the right
|
||||
32/64-bit build type).
|
||||
|
||||
To disable certain components (e.g., NetSSL_OpenSSL or Data/MySQL) from
|
||||
the build, edit the text file named <*components*> in the distribution
|
||||
root directory and remove or comment the respective lines.
|
||||
|
||||
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 header files and import libraries, you have to either add
|
||||
the header file paths to 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 the resulting shared libraries must be in the PATH
|
||||
environment variable.
|
||||
|
||||
|
||||
!!Building On Unix/Linux/macOS
|
||||
|
||||
For building on Unix platforms, the POCO C++ Libraries come with their
|
||||
own build system. The build system is based on GNU Make 3.80 (or newer),
|
||||
with the help from a few shell scripts. If you do not have GNU Make 3.80
|
||||
(or newer) installed on your machine, you will need to download it from
|
||||
http://directory.fsf.org/devel/build/make.html and
|
||||
build and install it prior to building the POCO C++ Libraries.
|
||||
|
||||
You can check the version of GNU Make installed on your system with
|
||||
|
||||
$ gmake --version
|
||||
----
|
||||
|
||||
or
|
||||
|
||||
$ make --version
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
$ gunzip poco-X.Y.tar.gz
|
||||
$ tar -xf poco-X.Y.tar
|
||||
$ cd poco-X.Y
|
||||
$ ./configure
|
||||
$ gmake -s
|
||||
----
|
||||
|
||||
For help, either invoke
|
||||
|
||||
$ ./configure --help
|
||||
----
|
||||
|
||||
Alternatively, you can read the configure script source for a list of possible options.
|
||||
For starters, we recommend <[--no-tests]> and <[--no-samples]>, to reduce build times.
|
||||
On a multicore or multiprocessor machine, use parallel makes to speed up
|
||||
the build (<[make -j4]>).
|
||||
|
||||
Once you have successfully built POCO, you can install it
|
||||
to <*/usr/local*> (or another directory specified as parameter
|
||||
to configure <[--prefix=<path>]>):
|
||||
|
||||
$ sudo gmake -s install
|
||||
----
|
||||
|
||||
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
|
||||
third-party libraries (iodbc or unixodbc, mysqlclient) installed
|
||||
on your system. To do this, use the <[--omit]> argument to configure:
|
||||
|
||||
$ ./configure --omit=Data/ODBC,Data/MySQL
|
||||
----
|
||||
|
||||
<*IMPORTANT: Make sure that the path to the build directory does not
|
||||
contain symbolic links. Furthermore, on macOS (or other systems
|
||||
with case insensitive filesystems), make sure that the characters in
|
||||
the path have the correct case. Otherwise you'll get an error saying
|
||||
"Current working directory not under $PROJECT_BASE.".*>
|
||||
|
||||
|
||||
!!Building On QNX Neutrino
|
||||
|
||||
For QNX Neutrino, the Unix build system (see the instructions above) is used.
|
||||
You can use the build system to cross-compile for a target platform on a
|
||||
Solaris or Linux host. Unfortunately, the Cygwin-based Windows host
|
||||
environment has some major quirks that prevent the build system from
|
||||
working there. You can also use the build system on a self-hosted QNX
|
||||
system. The default build configuration for QNX (found in
|
||||
build/config/QNX) is for a self-hosted x86 platform. To specify another
|
||||
target, edit the CCVER setting in the build configuration file. For
|
||||
example, to compile for a PowerPC target, specify
|
||||
CCVER=3.3.1,gcc_ntoppcbe.
|
||||
|
||||
Service Pack 1 for QNX Neutrino 6.3 must be installed, otherwise compiling the
|
||||
Foundation library will fail due to a problem with the <*<list>*> header in the
|
||||
default (Dinkumware) C++ standard library.
|
||||
|
||||
When building on QNX, you might want to disable NetSSL_OpenSSL, Crypto and
|
||||
some Data connectors, unless you have the necessary third party components
|
||||
available:
|
||||
|
||||
$ ./configure --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL
|
||||
----
|
||||
|
||||
!!!Tutorials And Sample Code
|
||||
|
||||
Introductory documentation consisting of various documents and tutorials
|
||||
in the form of slide decks can be found at the
|
||||
[[http://pocoproject.org/documentation/ POCO C++ Libraries Documentation]] page.
|
||||
|
||||
Sample applications demonstrating the various features of the POCO C++
|
||||
Libraries are delivered with the source code. Every library's source
|
||||
code directory
|
||||
has a <*samples*> directory containing various sample applications.
|
||||
|
||||
When building the sample applications on platforms using the gmake-based
|
||||
build system, please make sure that the environment variable
|
||||
<[POCO_BASE]> contains
|
||||
the path to the POCO C++ Libraries source tree root directory.
|
||||
|
||||
|
||||
!!!Creating Your Own POCO-based Applications
|
||||
|
||||
The best way to create your first POCO-based application is by copying
|
||||
one of the sample projects and making the desired changes. Examine the
|
||||
project files and Makefiles to see what compiler options must be set for
|
||||
your specific platform.
|
15
vendor/POCO/doc/80100-HowToGetHelp.page
vendored
Normal file
15
vendor/POCO/doc/80100-HowToGetHelp.page
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
How To Get Help
|
||||
AAAIntroduction
|
||||
|
||||
If you got stuck with a problem when developing with the POCO C++ Libraries,
|
||||
here's some information how to get help and support.
|
||||
|
||||
First, and most important, <!DON'T PANIC!>!
|
||||
|
||||
There is help and support available.
|
||||
First, try the [[http://pocoproject.org POCO C++ Libraries Community]] resources on the Web,
|
||||
where you can find:
|
||||
- [[http://pocoproject.org/addons_services.html Professional Support]] by [[http://www.appinf.com Applied Informatics]],
|
||||
- [[http://pocoproject.org/documentation/ introductory slides and articles]], and
|
||||
- [[http://pocoproject.org/forum/ discussion forums]] on various topics.
|
||||
|
324
vendor/POCO/doc/90100-Acknowledgements.page
vendored
Normal file
324
vendor/POCO/doc/90100-Acknowledgements.page
vendored
Normal file
@ -0,0 +1,324 @@
|
||||
Acknowledgements
|
||||
AAAIntroduction
|
||||
|
||||
!!!Introduction
|
||||
|
||||
Portions of the POCO C++ Libraries utilize the
|
||||
following copyrighted material, the use of which is hereby acknowledged.
|
||||
|
||||
|
||||
!!!Expat XML Parser Toolkit 2.2
|
||||
|
||||
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
and Clark Cooper
|
||||
Copyright (c) 2001, 2002, 2003 Expat maintainers.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
----
|
||||
|
||||
|
||||
!!!Code from the FreeBSD Project
|
||||
|
||||
Copyright (c) 1983, 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
4. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
----
|
||||
|
||||
|
||||
!!!MD4 (RFC 1320) Message-Digest Algorithm
|
||||
|
||||
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD4 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
----
|
||||
|
||||
|
||||
!!!MD5 (RFC 1321) Message-Digest Algorithm
|
||||
|
||||
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
----
|
||||
|
||||
|
||||
!!!Perl Compatible Regular Expressions (PCRE) 8.41
|
||||
|
||||
PCRE is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Release 5 of PCRE is distributed under the terms of the "BSD" licence, as
|
||||
specified below. The documentation for PCRE, supplied in the "doc"
|
||||
directory, is distributed under the same terms as the software itself.
|
||||
|
||||
Written by: Philip Hazel <ph10@cam.ac.uk>
|
||||
|
||||
University of Cambridge Computing Service,
|
||||
Cambridge, England. Phone: +44 1223 334714.
|
||||
|
||||
Copyright (c) 1997-2014 University of Cambridge
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
----
|
||||
|
||||
|
||||
!!!zlib 1.2.11
|
||||
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly jloup@gzip.org
|
||||
Mark Adler madler@alumni.caltech.edu
|
||||
----
|
||||
|
||||
|
||||
!!!SQLite 3.22.0
|
||||
|
||||
The original author of SQLite has dedicated the code to the
|
||||
public domain (http://www.sqlite.org/copyright.html).
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the
|
||||
original SQLite code, either in source code form or as a compiled binary,
|
||||
for any purpose, commercial or non-commercial, and by any means.
|
||||
----
|
||||
|
||||
|
||||
!!!double-conversion
|
||||
|
||||
Copyright 2010 the V8 project authors. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
----
|
||||
|
||||
|
||||
!!!pdjson (Public Domain JSON Parser for C)
|
||||
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
----
|
||||
|
||||
|
||||
!!!Code from the LLVM Compiler Infrastructure
|
||||
|
||||
University of Illinois/NCSA
|
||||
Open Source License
|
||||
|
||||
Copyright (c) 2007-2012 University of Illinois at Urbana-Champaign.
|
||||
All rights reserved.
|
||||
|
||||
Developed by:
|
||||
|
||||
LLVM Team
|
||||
|
||||
University of Illinois at Urbana-Champaign
|
||||
|
||||
http://llvm.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal with
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimers.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimers in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the names of the LLVM Team, University of Illinois at
|
||||
Urbana-Champaign, nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this Software without specific
|
||||
prior written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||
SOFTWARE.
|
||||
----
|
||||
|
||||
|
||||
!!! OrderedMap and OrderedSet
|
||||
|
||||
https://tessil.github.io/ordered-map/
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Tessil
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
2371
vendor/POCO/doc/99100-ReleaseNotes.page
vendored
Normal file
2371
vendor/POCO/doc/99100-ReleaseNotes.page
vendored
Normal file
File diff suppressed because it is too large
Load Diff
834
vendor/POCO/doc/99150-GMakeBuildNotes.page
vendored
Normal file
834
vendor/POCO/doc/99150-GMakeBuildNotes.page
vendored
Normal file
@ -0,0 +1,834 @@
|
||||
POCO C++ Libraries GNU Make Build System
|
||||
AAAIntroduction
|
||||
|
||||
!!!Introduction
|
||||
|
||||
The POCO C++ Libraries use a built system based on
|
||||
[[http://www.gnu.org/software/make/ GNU Make]] on every platform
|
||||
capable of running it. This includes Linux, Mac OS X, virtually
|
||||
every other Unix platform, as well as Cygwin and MinGW on Windows.
|
||||
|
||||
Why GNU Make? Well, GNU Make is available virtually everywhere
|
||||
and it's usually readily available, such as on Linux and Mac OS X.
|
||||
Sure, there are more advanced build systems out there, but the
|
||||
philisophy for POCO is download -- compile -- go. Requiring the user
|
||||
to download and install another build tool just for getting
|
||||
POCO to work is unacceptable.
|
||||
|
||||
The build system consists of a number of make files, as well as a few
|
||||
supporting shell scripts. All core files are located within the <*build*>
|
||||
directory in the POCO distribution. For every library and executable,
|
||||
there is a small make file describing the kind of project,
|
||||
its input files, and the output.
|
||||
|
||||
The POCO build system automatically determines the dependencies
|
||||
between source and header files. This is done when a source file is
|
||||
compiled for the first time, or after a source file has been changed.
|
||||
This relieves the developer from the tedious task of maintining file
|
||||
dependencies manually - one of the biggest drawbacks of GNU Make.
|
||||
|
||||
|
||||
!!Build System Features
|
||||
|
||||
The POCO build system supports the following features:
|
||||
|
||||
* building libraries, applications and plugins
|
||||
* debug and release builds
|
||||
* dynamic and static linking
|
||||
* 32-bit and 64-bit builds
|
||||
* automatic dependency detection
|
||||
* easy to use
|
||||
* support for cross-compiling for embedded platforms
|
||||
such as Embedded Linux or iOS
|
||||
|
||||
|
||||
!!Build System Overview
|
||||
|
||||
The core of the build system consists of three different kinds of files --
|
||||
platform configuration files, make rules and shell scripts. All are located
|
||||
in the <*build*> directory within the POCO C++ Libraries root directory.
|
||||
|
||||
build/
|
||||
config/
|
||||
Darwin
|
||||
Linux
|
||||
HP-UX
|
||||
...
|
||||
|
||||
rules/
|
||||
compile
|
||||
dylib
|
||||
exec
|
||||
global
|
||||
lib
|
||||
|
||||
script/
|
||||
makedepend.gcc
|
||||
makedepend.cxx
|
||||
makedepend.SunCC
|
||||
makeldpath
|
||||
projname
|
||||
shlibln
|
||||
...
|
||||
----
|
||||
|
||||
|
||||
!Configuration Files
|
||||
|
||||
Configuration files contain all the knowledge how the toolchain (compiler and linker)
|
||||
must be invoked for a given platform. Configuration files for the most common
|
||||
Unix platforms and their toolchains, as well as for Cygwin and MinGW are already
|
||||
part of POCO.
|
||||
Support for an additional platform (or a variation of a platform) can be added
|
||||
by creating a new (or copying and modifying) an existing build configuration file.
|
||||
|
||||
Configuration files are located in the <*build/config*> directory.
|
||||
|
||||
|
||||
!Rule Files
|
||||
|
||||
Rule files contain platform independent make rules for compiling and
|
||||
linking executables or (static and shared) libraries from source files,
|
||||
using the tools defined in a configuration file. Rule files are located
|
||||
in the <*build/rules*> directory.
|
||||
|
||||
|
||||
!Script Files
|
||||
|
||||
Script files are called by the build system's make files to do things that
|
||||
cannot be expressed in make files. For example, there are scripts for
|
||||
invoking a particular C++ compiler in such a way that it produces a list of
|
||||
dependencies for later inclusion by the build system. Script files are
|
||||
located in the <*build/script*> directory.
|
||||
|
||||
|
||||
|
||||
!!Filesystem Layout
|
||||
|
||||
!Sources
|
||||
|
||||
The build system expects a project's files (header files, source files, Makefiles)
|
||||
to be in a certain directory layout.
|
||||
First, all project directories must be located in or under the same directory where the
|
||||
<*build*> directory is located, or in a directory below.
|
||||
All header files must be in the <*include*> directory (or a subdirectory of it).
|
||||
All source files must be in the <*src*> directory.
|
||||
Finally, there must be a Makefile (named <*Makefile*>) located in the project directory.
|
||||
|
||||
Below is a sample for a POCO source directory hierarchy:
|
||||
|
||||
poco/
|
||||
build/
|
||||
Foundation/
|
||||
Net/
|
||||
Util/
|
||||
XML/
|
||||
...
|
||||
|
||||
MyLib/
|
||||
include/
|
||||
MyLib.h
|
||||
MyClass.h
|
||||
|
||||
src/
|
||||
MyClass.cpp
|
||||
|
||||
Makefile
|
||||
----
|
||||
|
||||
|
||||
!Build Products
|
||||
|
||||
The POCO build system puts final build products (executables and libraries)
|
||||
and intermediate products (object files, dependency files) into certain directories.
|
||||
Unless specified otherwise (by setting the environment variable
|
||||
POCO_BUILD accordingly -- see below), these directories are located within
|
||||
the source directory tree. All libraries are put into a
|
||||
directory with the path <*lib/<OSNAME>/<OSARCH>*>, within the POCO base directory.
|
||||
Executables are put into a directory with the path <*bin/<OSNAME>/<OSARCH>*>,
|
||||
within the project directory. Object files are put into a directory with the
|
||||
path <*obj/<OSNAME>/<OSARCH>*>, within the project directory.
|
||||
Dependency files are put into <*.dep/<OSNAME>/<OSARCH>*>,
|
||||
also within the project directory.
|
||||
|
||||
Unless specified otherwise (by setting the Makefile variables
|
||||
<[$(POCO_TARGET_OSNAME)]> and <[$(POCO_TARGET_OSARCH)]>, <*<OSNAME>*> is the
|
||||
name of the host's operating system, as obtained by a call to
|
||||
<*uname*> (or something equivalent), and <*<OSARCH>*> is the name of the
|
||||
host's hardware architecture, as obtained by a call to <*uname -m*>
|
||||
(or something equivalent).
|
||||
|
||||
Taking into account the build products, a typical project hierarchy looks like this:
|
||||
|
||||
|
||||
poco/
|
||||
build/
|
||||
lib/
|
||||
Linux/
|
||||
i686/
|
||||
libCppUnit.so.1
|
||||
libCppUnitd.so.1
|
||||
libCppUnit.so
|
||||
libCppUnitd.so
|
||||
libPocoFouncation.so.1
|
||||
...
|
||||
|
||||
Foundation/
|
||||
...
|
||||
testsuite/
|
||||
...
|
||||
bin/
|
||||
Linux/
|
||||
i686/
|
||||
testrunner
|
||||
testrunnerd
|
||||
...
|
||||
|
||||
Net/
|
||||
Util/
|
||||
XML/
|
||||
...
|
||||
|
||||
MyLib/
|
||||
.dep/
|
||||
Linux/
|
||||
i686/
|
||||
MyClass.d
|
||||
|
||||
obj/
|
||||
Linux/
|
||||
i686/
|
||||
MyClass.o
|
||||
|
||||
include/
|
||||
MyLib.h
|
||||
MyClass.h
|
||||
|
||||
src/
|
||||
MyClass.cpp
|
||||
|
||||
Makefile
|
||||
----
|
||||
|
||||
|
||||
!!Project Makefiles
|
||||
|
||||
Depending on the kind of project, a project Makefile comes in one of three variants.
|
||||
|
||||
|
||||
!Library Makefiles
|
||||
|
||||
The Makefile for a library always looks like this:
|
||||
|
||||
#
|
||||
# Makefile for a library
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
objects = MyClass ...
|
||||
|
||||
target = MyLib
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation ...
|
||||
|
||||
include $(POCO_BASE)/build/rules/lib
|
||||
----
|
||||
|
||||
|
||||
Every Makefile always has to include <*$(POCO_BASE)/build/rules/global*> first.
|
||||
In the <*objects*> section, the source files (located in the <*src*> directory)
|
||||
must be specified. The file extension must not be included; the build system
|
||||
will find files ending in .cpp (C++ sources) and .c (C sources).
|
||||
<*target*> specifies the name of the library, <*target_version*> specifies the
|
||||
version number for the shared library. <*target_libs*> specifies the
|
||||
libraries required for linking the library.
|
||||
|
||||
Last in the Makefile is the inclusion of <*$(POCO_BASE)/build/rules/lib*>,
|
||||
which includes the rules for building a shared or static library.
|
||||
|
||||
|
||||
!Executable Makefiles
|
||||
|
||||
Makefiles for executables look similar to the ones for libraries.
|
||||
|
||||
|
||||
#
|
||||
# Makefile for a library
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
objects = MyClass ...
|
||||
|
||||
target = MyLib
|
||||
target_libs = PocoFoundation ...
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
----
|
||||
|
||||
|
||||
|
||||
The only differences are the missing <*target_version*> entry, and the
|
||||
<*$(POCO_BASE)/build/rules/exec*> file, which is included instead of
|
||||
<*$(POCO_BASE)/build/rules/lib*> at the end of the Makefile.
|
||||
|
||||
|
||||
|
||||
!Plugin Makefiles
|
||||
|
||||
|
||||
|
||||
Makefiles for plugins - shared libraries that are loadable dynamically at runtime - again look almost the same as Makefiles for ordinary libraries or executables.
|
||||
|
||||
#
|
||||
# Makefile for a library
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
objects = MyClass ...
|
||||
|
||||
target = MyPlugin
|
||||
target_libs = PocoFoundation ...
|
||||
|
||||
include $(POCO_BASE)/build/rules/dylib
|
||||
----
|
||||
|
||||
|
||||
The difference is the file that is included at the end of the Makefile:
|
||||
<*$(POCO_BASE)/build/rules/dylib*>.
|
||||
|
||||
|
||||
!!!Build System Reference
|
||||
|
||||
|
||||
!!Target Variables
|
||||
|
||||
!target
|
||||
|
||||
The <*target*> variable specifies the name of the resulting library or executable,
|
||||
excluding the suffix.
|
||||
|
||||
|
||||
!target_version
|
||||
|
||||
The <*target_version*> variable specifies the shared library version of the resulting
|
||||
shared library.
|
||||
|
||||
|
||||
!target_libs
|
||||
|
||||
The <*target_libs*> variable specifies all libraries that must be linked to the
|
||||
target. These libraries must have been built with this build system and they
|
||||
must follow the build system conventions, specifically, the names for debug
|
||||
and release builds.
|
||||
|
||||
|
||||
!target_extlibs
|
||||
|
||||
The <*target_extlibs*> variables specifies additional libraries that must be
|
||||
linked to the target. No assumptions are made regarding debug or release builds.
|
||||
The names given here are simply passed to the linker by prepending the <[-l]> flag.
|
||||
|
||||
|
||||
!target_includes
|
||||
|
||||
The <*target_includes*> variable specifies a list of directories used for searching
|
||||
header files.
|
||||
|
||||
|
||||
!!Postbuild Command
|
||||
|
||||
A Makefile can contain a so-called postbuild command -- a shell command
|
||||
that will be executed when the target has been built successfully.
|
||||
To specify a postbuild command, define the variable <*postbuild*>
|
||||
in your Makefile, e.g.
|
||||
|
||||
#
|
||||
# Makefile for a library
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
objects = MyClass ...
|
||||
|
||||
target = MyLib
|
||||
target_libs = PocoFoundation ...
|
||||
|
||||
postbuild = echo "The build is done."
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
----
|
||||
|
||||
|
||||
!!Make Targets
|
||||
|
||||
Independently of which kind of product (library, executable, plugin) is
|
||||
being built, there are always five make targets available:
|
||||
Note that these targets are only available in project-level Makefiles, not
|
||||
the global Makefile.
|
||||
|
||||
!clean
|
||||
|
||||
The <*clean*> target will remove all executable and intermediate object files,
|
||||
forcing a full rebuild with the next make.
|
||||
|
||||
|
||||
!all
|
||||
|
||||
<*all*> is the default target, used if no other target is specified.
|
||||
Depending on the current configuration, it will either build a statically linked or
|
||||
dynamically linked library/executable, or both.
|
||||
|
||||
|
||||
!static_debug
|
||||
|
||||
The <*static_debug*> target will build a statically linked debug version of
|
||||
the library or executable. Statically linked executables will be linked
|
||||
in the <*static*> subdirectory within the <*bin/<OSNAME>/<OSARCH>*> directory.
|
||||
Debug libraries and executables have a 'd' appended to their basename
|
||||
(e.g., MyLibd.so).
|
||||
|
||||
|
||||
!static_release
|
||||
|
||||
The <*static_release*> target will build a statically linked release
|
||||
version of the library or executable.
|
||||
|
||||
|
||||
!shared_debug
|
||||
|
||||
The <*shared_debug*> target will build a dynamically linked debug version
|
||||
of the library or executable. The library or executable will
|
||||
have the suffix <*d*> appended to its name (e.g., if target is MyExec,
|
||||
the actual name of the executable will be MyExecd).
|
||||
|
||||
|
||||
!shared_release
|
||||
|
||||
The <*shared_release*> target will build a dynamically linked release
|
||||
version of the library or executable.
|
||||
|
||||
|
||||
!!Environment Variables
|
||||
|
||||
The POCO build system requires or uses certain environment variables to work properly.
|
||||
|
||||
!POCO_BASE
|
||||
|
||||
<*POCO_BASE*> is required and specifies the directory where the POCO
|
||||
source tree is located.
|
||||
|
||||
|
||||
!POCO_BUILD
|
||||
|
||||
<*POCO_BUILD*> specifies the directory where the build system puts all
|
||||
intermediate build files (object files, dependency files) and build
|
||||
products (libraries and executables). Normally, these files are located
|
||||
within the POCO source tree. Setting POCO_BUILD allows to keep the POCO
|
||||
source tree clean and free of binaries.
|
||||
|
||||
|
||||
!POCO_CONFIG
|
||||
|
||||
<*POCO_CONFIG*> specifies the build configuration file (located in build/config)
|
||||
to use. Defaults to the output of <*uname*> if not specified.
|
||||
|
||||
|
||||
!POCO_TARGET_OSNAME and POCO_TARGET_OSARCH
|
||||
|
||||
<*POCO_TARGET_OSNAME*> and >*POCO_TARGET_OSARCH*> are used in
|
||||
cross builds, to specify the operating system name and hardware
|
||||
architecture of the target. These names is used to find the directory
|
||||
where intermediate object files and final build products are put.
|
||||
Intermediate files are always put into <*obj/<OSNAME>/<OSARCH>*>
|
||||
and final build products are put into <*lib/<OSNAME>/<OSARCH>*>, or
|
||||
<*bin/<OSNAME>/<OSARCH>*>, respectively.
|
||||
If <*POCO_TARGET_OSNAME*> is specified, its value becomes the
|
||||
value for <*<OSNAME>*>. If <*POCO_TARGET_OSARCH*> is specified, its value
|
||||
likewise becomes the value for <*<OSARCH>*>
|
||||
|
||||
The default value for <*<OSNAME>*> is the output of <*uname*> or a
|
||||
similar command.
|
||||
The default value for <*<OSARCH>*> is the output of <*uname -m*> or a
|
||||
similar command.
|
||||
|
||||
|
||||
!OSARCH_64BITS
|
||||
|
||||
If defined to 1, will force a 64 bit build on platforms that support 64 bit builds.
|
||||
|
||||
|
||||
!PROJECT_BASE
|
||||
|
||||
|
||||
Setting this environment variable allows you to use the build system to
|
||||
build POCO-based libraries and executables outside the POCO_BASE directory
|
||||
hierarchy. Given a directory <*/projects*> containing a project directory
|
||||
<*MyProject*> (that is, <*/projects/MyProject*>), <*PROJECT_BASE*>
|
||||
must be set to <*/projects*>. Assuming <*/projects/MyProject/Makefile*>
|
||||
is available, you can change to the <*/projects/MyProject*> directory and
|
||||
invoke <*gmake*> to build your project. <*POCO_BASE*> must still be set
|
||||
and point to the POCO source tree, as usual.
|
||||
|
||||
|
||||
!!Special Files
|
||||
|
||||
!components
|
||||
|
||||
The build system requires a file named <*components*> being located in
|
||||
<*$(POCO_BASE)*>. This file contains a list of project names, one per line.
|
||||
The contents of this file are used by the build system to automatically
|
||||
build include search paths. For example, if <*components*> has the following content:
|
||||
|
||||
Foundation
|
||||
XML
|
||||
Util
|
||||
Net
|
||||
----
|
||||
|
||||
the following include search path options will be used for compiling:
|
||||
|
||||
-I$(POCO_BASE)/Foundation/include -I$(POCO_BASE)/XML/include -I$(POCO_BASE)/Util/include -I$(POCO_BASE)/Net/include
|
||||
----
|
||||
|
||||
|
||||
If a new library is being added to POCO, a corresponding entry should be made in the <*components*> file, so that the compiler can find its header files.
|
||||
|
||||
|
||||
!libversion
|
||||
|
||||
The content of the file <*libversion*>, located in <*$(POCO_BASE)*>,
|
||||
will be stored in the variable <*$(LIBVERSION)*>. This variable can be used
|
||||
in a Makefile as the value for the <*target_version*> variable.
|
||||
|
||||
|
||||
!Configuring the Build Process
|
||||
|
||||
The build process is configured by build configuration files,
|
||||
located in the <*build/config*> directory.
|
||||
Unless specified otherwise, by setting the <*POCO_CONFIG*>
|
||||
environment variable accordingly, the build system selects the
|
||||
build configuration file with the same name as the host's
|
||||
operating system (output of <*uname*>). If you need support for a
|
||||
new operating system, or just need to customize an existing configuration,
|
||||
you'll usually create a new build configuration file (by copying an existing one).
|
||||
|
||||
A typical build configuration file looks like this:
|
||||
|
||||
#
|
||||
# Linux
|
||||
#
|
||||
# Make settings for Linux 2.6/gcc 3.3
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# General Settings
|
||||
#
|
||||
LINKMODE = SHARED
|
||||
|
||||
#
|
||||
# Define Tools
|
||||
#
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
LINK = $(CXX)
|
||||
LIB = ar -cr
|
||||
RANLIB = ranlib
|
||||
SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@
|
||||
SHLIBLN = $(POCO_BASE)/build/script/shlibln
|
||||
STRIP = strip
|
||||
DEP = $(POCO_BASE)/build/script/makedepend.gcc
|
||||
SHELL = sh
|
||||
RM = rm -rf
|
||||
CP = cp
|
||||
MKDIR = mkdir -p
|
||||
|
||||
#
|
||||
# Extension for Shared Libraries
|
||||
#
|
||||
SHAREDLIBEXT = .so.$(target_version)
|
||||
SHAREDLIBLINKEXT = .so
|
||||
|
||||
#
|
||||
# Compiler and Linker Flags
|
||||
#
|
||||
CFLAGS =
|
||||
CFLAGS32 =
|
||||
CFLAGS64 =
|
||||
CXXFLAGS = -Wall -Wno-sign-compare
|
||||
CXXFLAGS32 =
|
||||
CXXFLAGS64 =
|
||||
LINKFLAGS =
|
||||
LINKFLAGS32 =
|
||||
LINKFLAGS64 =
|
||||
STATICOPT_CC =
|
||||
STATICOPT_CXX =
|
||||
STATICOPT_LINK = -static
|
||||
SHAREDOPT_CC = -fPIC
|
||||
SHAREDOPT_CXX = -fPIC
|
||||
SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH)
|
||||
DEBUGOPT_CC = -g -D_DEBUG
|
||||
DEBUGOPT_CXX = -g -D_DEBUG
|
||||
DEBUGOPT_LINK = -g
|
||||
RELEASEOPT_CC = -O2 -DNDEBUG
|
||||
RELEASEOPT_CXX = -O2 -DNDEBUG
|
||||
RELEASEOPT_LINK = -O2
|
||||
|
||||
#
|
||||
# System Specific Flags
|
||||
#
|
||||
SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL
|
||||
|
||||
#
|
||||
# System Specific Libraries
|
||||
#
|
||||
SYSLIBS = -lpthread -ldl -lrt
|
||||
----
|
||||
|
||||
The various settings in the build configuration file are described below.
|
||||
|
||||
!!General Settings
|
||||
|
||||
!LINKMODE
|
||||
|
||||
This specifies the default link mode, which can have the values
|
||||
<*STATIC*>, <*SHARED*> or <*BOTH*>.
|
||||
|
||||
|
||||
!TOOL
|
||||
|
||||
For cross builds, <*TOOL*> specifies the prefix for the toolchain executables, e.g.
|
||||
|
||||
TOOL = arm-unknown-linux-gnu
|
||||
----
|
||||
|
||||
<*TOOL*> can later be used in the tool section, as in:
|
||||
|
||||
CC = $(TOOL)-gcc
|
||||
CXX = $(TOOL)-g++
|
||||
...
|
||||
----
|
||||
|
||||
|
||||
!POCO_TARGET_OSNAME and POCO_TARGET_OSARCH
|
||||
|
||||
The general settings section is also the right place to define
|
||||
<*POCO_TARGET_OSNAME*> and <*POCO_TARGET_OSARCH*> for cross builds.
|
||||
|
||||
|
||||
!!Tool Definition
|
||||
|
||||
!CC
|
||||
|
||||
<*CC*> specifies the command for invoking the C compiler.
|
||||
|
||||
|
||||
!CXX
|
||||
|
||||
<*CXX*> specifies the command for invoking the C++ compiler.
|
||||
|
||||
|
||||
!LINK
|
||||
|
||||
<*LINK*> specifies the command for invoking the link editor.
|
||||
|
||||
|
||||
!STRIP
|
||||
|
||||
<*STRIP*> specifies the command for invoking the strip utility.
|
||||
|
||||
|
||||
!LIB
|
||||
|
||||
<*LIB*> specifies the command for invoking the library archiver utility.
|
||||
|
||||
|
||||
!RANLIB
|
||||
|
||||
<*RANLIB*> specifies the command for invoking the library table of contents updater
|
||||
utility.
|
||||
|
||||
|
||||
!SHLIB
|
||||
|
||||
<*SHLIB*> specifies the command for creating shared libraries.
|
||||
|
||||
|
||||
!SHLIBLN
|
||||
|
||||
<*SHLIBLN*> specifies the command for creating shared library
|
||||
symbolic links (e.g. <*libPocoFoundation.so*> -> <*libPocoFoundation.so.1*>)
|
||||
|
||||
|
||||
!DEP
|
||||
|
||||
<*DEP*> specifies the command for creating or updating the dependencies. This
|
||||
is usually a shell script invoking the C/C++ compiler in a special way to generate
|
||||
a list of dependencies.
|
||||
|
||||
|
||||
!SHELL
|
||||
|
||||
<*SHELL*> specifies the command for invoking the POSIX shell.
|
||||
|
||||
|
||||
!RM
|
||||
|
||||
<*RM*> specifies the command for deleting files and directories.
|
||||
|
||||
|
||||
!CP
|
||||
|
||||
<*CP*> specifies the command for copying files.
|
||||
|
||||
|
||||
!MKDIR
|
||||
|
||||
<*MKDIR*> specifies the command for creating directories.
|
||||
|
||||
|
||||
!!Shared Library Extensions
|
||||
|
||||
!SHAREDLIBEXT
|
||||
|
||||
<*SHAREDLIBEXT*> specifies the extension for shared libraries.
|
||||
This usually includes a version number (e.g. <*.so.1*>).
|
||||
|
||||
|
||||
!SHAREDLIBLINKEXT
|
||||
|
||||
<*SHAREDLIBLINKEXT*> specifies the extension for shared library
|
||||
symbolic links. (e.g., <*.so*>)
|
||||
|
||||
|
||||
!!Compiler and Linker Flags
|
||||
|
||||
!CFLAGS
|
||||
|
||||
<*CFLAGS*> specifies additional flags passed to the C compiler.
|
||||
|
||||
|
||||
!CFLAGS32
|
||||
|
||||
<*CFLAGS32*> specifies additional flags passed to the C compiler
|
||||
if compiling in 32 bit mode.
|
||||
|
||||
|
||||
!CFLAGS64
|
||||
|
||||
<*CFLAGS64*> specifies additional flags passed to the C compiler
|
||||
if compiling in 64 bit mode.
|
||||
|
||||
|
||||
!CXXFLAGS
|
||||
|
||||
<*CXXFLAGS*> specifies additional flags passed to the C++ compiler.
|
||||
|
||||
|
||||
!CXXFLAGS32
|
||||
|
||||
<*CXXFLAGS32*> specifies additional flags passed to the C++ compiler if
|
||||
compiling in 32 bit mode.
|
||||
|
||||
|
||||
!CXXFLAGS64
|
||||
|
||||
<*CXXFLAGS64*> specifies additional flags passed to the C++ compiler if
|
||||
compiling in 64 bit mode.
|
||||
|
||||
|
||||
!LINKFLAGS
|
||||
|
||||
<*LINKFLAGS*> specifies additional flags passed to the linker.
|
||||
|
||||
|
||||
!LINKFLAGS32
|
||||
|
||||
<*LINKFLAGS32*> specifies additional flags passed to the linker if
|
||||
compiling in 32 bit mode.
|
||||
|
||||
|
||||
!LINKFLAGS64
|
||||
|
||||
<*LINKFLAGS64*> specifies additional flags passed to the linker if
|
||||
compiling in 64 bit mode.
|
||||
|
||||
|
||||
!STATICOPT_CC
|
||||
|
||||
<*STATICOPT_CC*> specifies additonal flags passed to the C compiler
|
||||
if compiling for static linking.
|
||||
|
||||
|
||||
!STATICOPT_CXX
|
||||
|
||||
<*STATICOPT_CXX*> specifies additonal flags passed to the C++ compiler if
|
||||
compiling for static linking.
|
||||
|
||||
|
||||
!STATICOPT_LINK
|
||||
|
||||
<*STATICOPT_LINK*> specifies additonal flags passed to the linker for
|
||||
static linking.
|
||||
|
||||
|
||||
!SHAREDOPT_CC
|
||||
|
||||
<*SHAREDOPT_CC*> specifies additonal flags passed to the C compiler if
|
||||
compiling for dynamic linking.
|
||||
|
||||
|
||||
!SHAREDOPT_CXX
|
||||
|
||||
<*SHAREDOPT_CXX*> specifies additonal flags passed to the C++ compiler if
|
||||
compiling for dynamic linking.
|
||||
|
||||
|
||||
!SHAREDOPT_LINK
|
||||
|
||||
<*SHAREDOPT_LINK*> specifies additonal flags passed to the linker for dynamic linking.
|
||||
|
||||
|
||||
!DEBUGOPT_CC
|
||||
|
||||
<*DEBUGOPT_CC*> specifies additional flags passed to the C compiler if compiling in debug mode.
|
||||
|
||||
|
||||
!DEBUGOPT_CXX
|
||||
|
||||
<*DEBUGOPT_CXX*> specifies additional flags passed to the C++ compiler if compiling in debug mode.
|
||||
|
||||
|
||||
!DEBUGOPT_LINK
|
||||
|
||||
<*DEBUGOPT_LINK*> specifies additional flags passed to the linker if linking in debug mode.
|
||||
|
||||
|
||||
!RELEASEOPT_CC
|
||||
|
||||
<*RELEASEOPT_CC*> specifies additional flags passed to the C compiler if compiling in release mode.
|
||||
|
||||
|
||||
!RELEASEOPT_CXX
|
||||
|
||||
<*RELEASEOPT_CXX*> specifies additional flags passed to the C++ compiler if compiling in release mode.
|
||||
|
||||
|
||||
!RELEASEOPT_LINK
|
||||
|
||||
<*RELEASEOPT_LINK*> specifies additional flags passed to the linker if linking in release mode.
|
||||
|
||||
|
||||
!!System Specific Flags
|
||||
|
||||
!SYSFLAGS
|
||||
|
||||
<*SYSFLAGS*> specifies flags passed to both the C and C++ compiler. This usually contains system-specific include paths and settings such as -D_XOPEN_SOURCE=500 or -D_THREAD_SAFE.
|
||||
|
||||
|
||||
!SYSLIBS
|
||||
|
||||
<*SYSLIBS*> specifies flags passed to the linker. Usually, this flags specify system-specific libraries, such as -lpthread or -ldl.
|
47
vendor/POCO/doc/99150-WindowsPlatformNotes.page
vendored
Normal file
47
vendor/POCO/doc/99150-WindowsPlatformNotes.page
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
POCO C++ Libraries Windows Platform Notes
|
||||
AAAIntroduction
|
||||
|
||||
!!!Introduction
|
||||
|
||||
The Windows versions of the POCO C++ Libraries are built with Visual Studio.
|
||||
Basic support for building with MinGW is there as well, but at this time
|
||||
is not officially supported and may or may not work.
|
||||
|
||||
Starting with release 1.10.0 the POCO C++ Libraries support new
|
||||
build configurations in the solution files for Visual Studio 2015 and newer,
|
||||
for building Win32 (32-bit) and x64 (64-bit) variants.
|
||||
|
||||
The following build configurations are available:
|
||||
* debug_shared, release_shared: dynamic link libraries (DLL) and dynamically linked executables, with DLL C/C++ runtime libraries.
|
||||
* debug_static_md, release_static_md: static libraries and statically linked executables with DLL C/C++ runtime libraries.
|
||||
* debug_static_mt, release_static_mt: static libraries and statically linked executables with static runtime libraries.
|
||||
|
||||
|
||||
!!!Libraries And Linking Considerations
|
||||
|
||||
!!Automatic Linking of POCO C++ Libraries
|
||||
|
||||
The POCO C++ Libraries header files contain <[#pragma comment]> directives that enable
|
||||
automatic linking of the required POCO libraries to an application. For this to work,
|
||||
a few rules must be kept in mind.
|
||||
|
||||
* The default is to link the POCO C++ Libraries dynamically (DLL).
|
||||
* To link statically, the code using the POCO C++ Libraries must be compiled
|
||||
with the preprocessor symbol <[POCO_STATIC]> defined.
|
||||
|
||||
|
||||
!!Library Naming Conventions
|
||||
|
||||
The following naming conventions are used:
|
||||
|
||||
* DLL import libraries are named PocoLIB.lib for the release build
|
||||
and PocoLIBd.lib for the debug build.
|
||||
* Static libraries built using the static multithreaded C/C++ runtime libraries
|
||||
are named PocoLIBmt.lib (release) and PocoLIBmtd.lib (debug).
|
||||
* Static libraries built using the DLL C/C++ runtime libraries are
|
||||
named PocoLIBmd.lib (release) and PocoLIBmdd.lib (debug).
|
||||
|
||||
32-bit libraries are placed in the <*lib*> directory. 64-bit libraries
|
||||
are placed in the <*lib64*> directory. DLLs are placed in <*bin*> (32-bit)
|
||||
or <*bin64*> (64-bit). 64-bit DLLs are named PocoLIB64.dll for release
|
||||
and PocoLIB64d.dll for debug, respectively.
|
132
vendor/POCO/doc/99200-WinCEPlatformNotes.page
vendored
Normal file
132
vendor/POCO/doc/99200-WinCEPlatformNotes.page
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
POCO C++ Libraries Windows CE Platform Notes
|
||||
AAAIntroduction
|
||||
|
||||
!!!Introduction
|
||||
|
||||
Starting with release 1.4.0 the POCO C++ Libraries can be used on
|
||||
Windows CE 6. Project files for Visual Studio 2008 are provided that
|
||||
support static and shared debug and release builds.
|
||||
|
||||
The port should work for Windows CE 5 as well, however, this has not been tested.
|
||||
|
||||
|
||||
!!!Changing The Target In The Project Files
|
||||
|
||||
The project files contain build configurations for the "Digi JumpStart (ARMV4I)"
|
||||
target. To use another target, the Visual Studio project and solution files
|
||||
must be changed accordingly. Note that the project files cannot be opened
|
||||
by Visual Studio unless the target referenced in the project and solution files is available.
|
||||
To change the project and solution files for your platform, replace
|
||||
all occurrences of the string "Digi JumpStart (ARMV4I)" with the name
|
||||
of your platform (e.g. "Windows Mobile 6 Professional SDK (ARMV4I)").
|
||||
This is best done with a text editor that supports global search/replace
|
||||
across an entire directory tree (solution and project files are plain text/xml
|
||||
files, so there's no risk breaking something).
|
||||
|
||||
|
||||
!!!Restrictions
|
||||
|
||||
!!Poco::Environment
|
||||
|
||||
Windows CE does not support environment variables.
|
||||
Therefore, Poco::Environment::get() and Poco::Environment::has() only support the
|
||||
following hardcoded "pseudo" environment variables:
|
||||
* TEMP
|
||||
* TMP
|
||||
* HOMEPATH
|
||||
* COMPUTERNAME
|
||||
* OS
|
||||
* NUMBER_OF_PROCESSORS
|
||||
* PROCESSOR_ARCHITECTURE
|
||||
|
||||
Poco::Environment::set() always throws a Poco::NotImplementedException.
|
||||
|
||||
|
||||
!!Date/Time Support
|
||||
|
||||
Some date/time features are implemented with the help of [[http://wcelibcex.sourceforge.net/ WCELIBCEX]].
|
||||
The library is statically included in the Foundation library to simplify the build process.
|
||||
However, it is also possible to use WCELIBCEX as a separate library if the Foundation project file is modified accordingly
|
||||
(by removing or excluding from build the WCELIBCEX folder and modifying the header file search path accordingly).
|
||||
The following functions from WCELIBCEX are used:
|
||||
* wceex_time()
|
||||
* wceex_localtime()
|
||||
* wceex_mktime()
|
||||
|
||||
It should also be possible to use wcecompat instead of WCELIBCEX, as this library provides
|
||||
similar features. In this case, the calls to the wceex_* functions need to be replaced with
|
||||
the wcecompat counterparts. The affected files are Random.cpp, LocalDateTime.cpp,
|
||||
Timezone_WINCE.cpp and ThreadPool.cpp.
|
||||
|
||||
To obtain the current date and time with millisecond resolution,
|
||||
the hack described in <http://community.opennetcf.com/articles/cf/archive/2007/11/20/getting-a-millisecond-resolution-datetime-under-windows-ce.aspx>
|
||||
is used. This means there will be a one second delay when starting up
|
||||
the application.
|
||||
|
||||
|
||||
!!Poco::Path
|
||||
|
||||
Poco::Path::listRoots() returns the root directory ("\"), as well as all mounted storage devices
|
||||
(e.g., "\Hard Disk"), even if they are also present in the root directory.
|
||||
|
||||
Poco::Path::current() and Poco::Path::home() always return the root directory.
|
||||
|
||||
|
||||
!!Poco::RWLock
|
||||
|
||||
In the reader/writer lock implementation for Windows CE, writers always take precedence over readers.
|
||||
|
||||
|
||||
!!Poco::Process
|
||||
|
||||
Launching a process with pipes for redirecting input/output is not supported.
|
||||
|
||||
|
||||
!!Poco::Util::ServerApplication
|
||||
|
||||
Poco::Util::ServerApplication::waitForTerminationRequest(): CTRL-C does not work to shut down the application as
|
||||
it's not supported by the Windows CE console. The pkill utility supplied as part of the Util library
|
||||
samples can be used to terminate a process from the command line.
|
||||
|
||||
|
||||
!!Crypto and NetSSL
|
||||
|
||||
Crypto and NetSSL_OpenSSL have not been tested yet. Project files are there, but they might need some adaptions depending on
|
||||
how OpenSSL has been built for the Windows CE target.
|
||||
|
||||
|
||||
!!Data
|
||||
|
||||
Only the SQLite backend is currently supported.
|
||||
|
||||
The SQLite engine in Data/SQLite is built without localtime support (SQLITE_OMIT_LOCALTIME) due to localtime_s() not being
|
||||
available on Windows CE.
|
||||
|
||||
|
||||
!!Raw Sockets in Net
|
||||
|
||||
The test cases involving raw sockets will fail unless the testsuite is ran as a privileged (signed) application.
|
||||
These are RawSocketTest::testEchoIPv4(), RawSocketTest::testSendToReceiveFromIPv4() and ICMPClientTest::testPing().
|
||||
|
||||
|
||||
!!!Build Notes
|
||||
|
||||
Optimization settings should be set as follows for release builds
|
||||
(<*Properties > Configuration Properties > C/C++ > Optimization*>):
|
||||
* Optimization: Custom
|
||||
* Inline Function Expansion: Default
|
||||
* Enable Intrinsic Functions: Yes (/Oi)
|
||||
* Floating-Point Consistency: Default Consistency
|
||||
* Favor Size or Speed: Favor Fast Code (/Ot)
|
||||
* Whole Program Optimization: No
|
||||
|
||||
Other settings may or may not produce working programs.
|
||||
Specifically, setting <*Optimization*> to <*Maximize Speed (/O2)*> will result in failures in the
|
||||
test suite for Foundation Events due to a compiler optimizer bug.
|
||||
|
||||
For shared/DLL builds, the /FORCE:MULTIPLE option is passed to the linker. This is
|
||||
to avoid a problem with iostream classes and their methods (template instantiations),
|
||||
which for some unknown reason (possibly bug) will be exported by the Foundation library
|
||||
(and others) and thus cause multiply defined symbol errors.
|
||||
|
||||
The reference system used for testing is a Digi ConnectCore 9P 9360 running Windows CE 6.0.
|
233
vendor/POCO/doc/99250-VxWorksPlatformNotes.page
vendored
Normal file
233
vendor/POCO/doc/99250-VxWorksPlatformNotes.page
vendored
Normal file
@ -0,0 +1,233 @@
|
||||
POCO C++ Libraries VxWorks Platform Notes
|
||||
AAAIntroduction
|
||||
|
||||
!!!Introduction
|
||||
|
||||
Starting with release 1.4.1 the POCO C++ Libraries can be used on
|
||||
VxWorks 5.5.1 and newer. Project files for Tornado are provided that
|
||||
support debug and release builds using the Diab C++ compiler.
|
||||
|
||||
|
||||
!!!Requirements
|
||||
|
||||
!!Compiling the POCO C++ Libraries
|
||||
|
||||
When compiling the POCO C++ Libraries for a VxWorks target, as well as
|
||||
when including POCO C++ Libraries headers in a project for a VxWorks
|
||||
target, the preprocessor macro <[POCO_VXWORKS]> must be defined. This is
|
||||
because the Diab C++ compiler does not provide a predefined macro that
|
||||
allows for reliable detection of a VxWorks target.
|
||||
|
||||
|
||||
!!VxWorks OS Libraries
|
||||
|
||||
The following VxWorks OS libraries are required and must be
|
||||
available on the target:
|
||||
|
||||
- ansiTime
|
||||
- clockLib
|
||||
- cplusLib
|
||||
- dirLib (for Poco::File and Poco::Environment)
|
||||
- envLib (for Poco::Environment)
|
||||
- ftruncate (for Poco::File)
|
||||
- hostLib (for Poco::Environment)
|
||||
- ifLib
|
||||
- inetLib
|
||||
- ioLib
|
||||
- loadLib (for Poco::SharedLibrary)
|
||||
- moduleLib (for Poco::SharedLibrary)
|
||||
- netLib
|
||||
- pthreadLib
|
||||
- resolvLib
|
||||
- sockLib
|
||||
- symLib (for Poco::SharedLibrary)
|
||||
- timerLib
|
||||
- unldLib (for Poco::SharedLibrary)
|
||||
|
||||
Some OS libraries can be omitted if the POCO class requiring it
|
||||
(given in parenthesis) is not used.
|
||||
|
||||
|
||||
!!!Restrictions
|
||||
|
||||
!!Poco::Environment
|
||||
|
||||
- Poco::Environment::nodeName() returns the result of gethostname(); the host name
|
||||
can be set with sethostname().
|
||||
- Poco::Environment::processorCount() always returns 1.
|
||||
|
||||
|
||||
!!Date/Time Support
|
||||
|
||||
- Timezone support requires that the <[TIMEZONE]> environment
|
||||
variable is set accordingly on the target.
|
||||
- Poco::Timezone::name(), Poco::Timezone::standardName() and
|
||||
Poco::Timezone::dstName() all return the same value -- the
|
||||
timezone name specified in the <[TIMEZONE]> environment variable.
|
||||
|
||||
|
||||
!!Poco::File
|
||||
|
||||
- Poco::File::canRead() and Poco::File::canWrite() always return
|
||||
true. Poco::File::canExecute() always returns false, as does
|
||||
Poco::File::isLink().
|
||||
- Poco::File::isHidden() works the same as on Unix platforms
|
||||
(files with names starting with a period are considered hidden).
|
||||
- Poco::File::setWriteable() and Poco::File::setExecutable()
|
||||
are no-ops.
|
||||
|
||||
|
||||
!!Poco::Path
|
||||
|
||||
Poco::Path::home() returns the value of environment variable <[HOME]>, if defined,
|
||||
or else the root directory path ("/").
|
||||
|
||||
|
||||
!!Poco::FPEnvironment
|
||||
|
||||
The Poco::FPEnvironment class is not available on VxWorks and
|
||||
cannot be used.
|
||||
|
||||
|
||||
!!Poco::Process, Poco::Pipe, Poco::SharedMemory, Poco::NamedEvent, Poco::NamedMutex
|
||||
|
||||
VxWorks does not support processes and POCO makes no attempt
|
||||
to hide this fact. Poco::Process, Poco::Pipe (and related stream classes),
|
||||
Poco::SharedMemory, Poco::NamedEvent and Poco::NamedMutex are not available on VxWorks.
|
||||
|
||||
|
||||
!!Poco::RWLock
|
||||
|
||||
On VxWorks, Poco::RWLock is an ordinary mutex.
|
||||
|
||||
|
||||
!!Poco::SharedLibrary
|
||||
|
||||
Symbol lookup (Poco::SharedLibrary::hasSymbol() and Poco::SharedLibrary::getSymbol()) is
|
||||
slow, as the entire symbol table has to be searched sequentially (using symEach())
|
||||
to find a symbol defined in a specific module.
|
||||
|
||||
|
||||
!!Poco::UnicodeConverter
|
||||
|
||||
Poco::UnicodeConverter is not available on VxWorks because VxWorks does
|
||||
not support std::wstring.
|
||||
|
||||
|
||||
!!Poco::Util::Application
|
||||
|
||||
The macro <[POCO_APP_MAIN]> defines a function
|
||||
|
||||
int pocoAppMain(const char* appName, ...);
|
||||
----
|
||||
|
||||
with a variable number of arguments. The first argument specifies the
|
||||
name of the application and is equivalent to argv[0]. The remaining
|
||||
arguments of type <[const char*]> specify command-line arguments. The
|
||||
list of command-line arguments must be terminated by a NULL argument.
|
||||
|
||||
|
||||
!!Poco::Util::ServerApplication
|
||||
|
||||
An application waiting in Poco::Util::ServerApplication::waitForTerminationRequest()
|
||||
can be shut down by calling Poco::Util::ServerApplication::terminate().
|
||||
|
||||
The macro <[POCO_SERVER_MAIN]> defines a function
|
||||
|
||||
int pocoSrvMain(const char* appName, ...);
|
||||
----
|
||||
|
||||
which works in the same way as <[pocoAppMain()]>, defined by <[POCO_APP_MAIN]>.
|
||||
|
||||
|
||||
!!Crypto and NetSSL
|
||||
|
||||
Crypto and NetSSL_OpenSSL are currently not supported.
|
||||
|
||||
|
||||
!!Data
|
||||
|
||||
Only the SQLite backend is currently supported.
|
||||
Before building Data/SQLite for a VxWorks 5.5.1 target,
|
||||
the patch in <*$POCO_BASE/patches/VxWorks/sqlite3.c.patch*>
|
||||
must be applied by executing
|
||||
|
||||
$ patch -p0 <patches/VxWorks/sqlite3.c.patch
|
||||
----
|
||||
|
||||
in a Unix/Linux or Cygwin shell (from the
|
||||
<*$POCO_BASE*> directory). The patch is for
|
||||
SQLite 3.7.4 and may not work with other releases.
|
||||
|
||||
|
||||
!!!Build Notes
|
||||
|
||||
!!Generating Tornado 2.2 Project Files
|
||||
|
||||
The POCO C++ Libraries source code package does not contain
|
||||
project files for Tornado. However, a Bash shell script is provided that
|
||||
will generate the project files (.wpj). On Windows, a Cygwin installation
|
||||
is required to run this script. Project files are
|
||||
generated from VxWorks build description files (<**.vxbuild*>),
|
||||
which are present in all library directories (<*$POCO_BASE/Foundation*>,
|
||||
<*$POCO_BASE/XML*>, etc.) of libraries that are available on VxWorks. Also
|
||||
required are build configuration files that specify the build settings
|
||||
for a specific target architecture. These are located in
|
||||
<*$POCO_BASE/build/vxconfig*>. To generate
|
||||
a Tornado project file, run the <[vxprogen]> script from the
|
||||
respective directory and pass the name(s) of the desired build configuration
|
||||
as argument(s), e.g.:
|
||||
|
||||
$ cd Foundation
|
||||
$ ../build/script/vxprogen PPC440diab_release
|
||||
|
||||
A new directory named <*vx*> will be created, containing the
|
||||
generated Tornado project file. The project file can be
|
||||
opened in Tornado, and a build can be started.
|
||||
|
||||
!!Testing
|
||||
|
||||
Every testsuite exports a global function that runs the tests,
|
||||
similar to what the <*testrunner*> command does on Unix/Linux
|
||||
systems. For example, to invoke the Foundation testsuite on
|
||||
the target (using the host-based shell), first load the necessary modules:
|
||||
|
||||
=> ld <p:/poco-1.4/CppUnit/vx/PPC440diab_debug/cppUnit.out
|
||||
Loading p:/poco-1.4/CppUnit/vx/PPC440diab_debug/cppUnit.out \
|
||||
value = 13481712 = 0xcdb6f0
|
||||
=> ld <p:/poco-1.4/Foundation/vx/PPC440diab_debug/pocoFoundation.out
|
||||
Loading p:/poco-1.4/Foundation/vx/PPC440diab_debug/pocoFoundation.out -
|
||||
value = 13294784 = 0xcadcc0
|
||||
=> ld <p:/poco-1.4/Foundation/testsuite/vx/PPC440diab_debug/FoundationTestSuite.out
|
||||
Loading p:/poco-1.4/Foundation/testsuite/vx/PPC440diab_debug/FoundationTestSuite.out -
|
||||
value = 51068280 = 0x30b3d78
|
||||
----
|
||||
|
||||
Then, if the testsuite does file I/O, set the target's current directory
|
||||
to the testsuite directory:
|
||||
|
||||
=> @cd "/tgtsvr/poco-1.4/Foundation/testsuite"
|
||||
----
|
||||
|
||||
It's also a good ideal to redirect the standard output to the
|
||||
system console (serial port) with:
|
||||
|
||||
=> ?shConfig SH_GET_TASK_IO off
|
||||
----
|
||||
|
||||
Then, the testsuite can be started:
|
||||
|
||||
=> FoundationTestSuiteRunner "-all"
|
||||
----
|
||||
|
||||
The arguments passed to the FoundationTestSuiteRunner
|
||||
(or any other testsuite runner) function are the same
|
||||
as the ones passed to the <*testrunner*> command:
|
||||
one or more test/testsuite names, "-all" to run all
|
||||
tests, or "-print" to print all test/testsuite names.
|
||||
|
||||
!!Reference System
|
||||
|
||||
The reference system used for testing is an
|
||||
AMCC Canyonlands evaluation board
|
||||
(EV-460EX-KIT-05) running VxWorks 5.5.1.
|
114
vendor/POCO/doc/99300-AndroidPlatformNotes.page
vendored
Normal file
114
vendor/POCO/doc/99300-AndroidPlatformNotes.page
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
POCO C++ Libraries Android Platform Notes
|
||||
AAAIntroduction
|
||||
|
||||
!!!Introduction
|
||||
|
||||
Starting with release 1.4.2 the POCO C++ Libraries can be used on
|
||||
Android.
|
||||
In the past the android NDK used a gmake-based build system. They provided a
|
||||
a standalone "customized" toolchain. Also they used gcc and the gnu-stl as
|
||||
build environment. But these are all obsolete.
|
||||
|
||||
The newest android NDK is using a cmake based build system with a provided
|
||||
toolchain for cmake. Also they use now clang as compiler and the libc++ as
|
||||
standard library.
|
||||
|
||||
!!!Requirements
|
||||
|
||||
To build Poco for android you need as minimum the android NDK plus cmake executable.
|
||||
You can download the newest NDK from: https://developer.android.com/ndk and
|
||||
cmake from http://www.cmake.org or if you have already installed Android SDK,
|
||||
then install the NDK and cmake executable via the <*Android SDK Manager*>.
|
||||
|
||||
!!!Quick start
|
||||
|
||||
<path_to_android_sdk>/cmake/<cmake_version>/bin/cmake
|
||||
-H<path_to_poco_sourcen>
|
||||
-B/tmp/poco-build
|
||||
-G'Ninja'
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_MAKE_PROGRAM=<path_to_android_sdk>/cmake/<cmake_version>/bin/ninja
|
||||
-DCMAKE_TOOLCHAIN_FILE=<path_to_android_sdk>/ndk-bundle/build/cmake/android.toolchain.cmake
|
||||
-DANDROID_NATIVE_API_LEVEL=24
|
||||
-DANDROID_ABI=armeabi-v7a
|
||||
|
||||
!!!Using Android's Build System
|
||||
|
||||
To start with build Poco for android you need following tools/executables:
|
||||
|
||||
- cmake executable from the host or Android SDK
|
||||
- Toolchain for cmake from Android NDK
|
||||
- Build tool executable make or ninja (ninja-build). Ninja is the prefered way to build and is
|
||||
also provided by the Android SDK.
|
||||
|
||||
If you are using cmake from the Android SDK, then you can found this executable in:
|
||||
<path_to_android_sdk>/cmake/<cmake_version>/bin/cmake
|
||||
also the ninja build tool:
|
||||
<path_to_android_sdk>/cmake/<cmake_version>/bin/ninja
|
||||
|
||||
The easiest way is to set the PATH environment to <path_to_android_sdk>/cmake/<cmake_version>/bin
|
||||
then cmake and ninja is found via the environment.
|
||||
If you not set the PATH environment you should add -DCMAKE_MAKE_PROGRAM=<path_to_android_sdk>/cmake/<cmake_version>/bin/ninja
|
||||
as parameter for cmake.
|
||||
|
||||
If you have didn't installed the Android SDK, it is also possible to use make as build tool:
|
||||
<path_to_android_sdk>/ndk-bundle/prebuilt/linux-x86_64/bin/make
|
||||
or
|
||||
<path_to_android_sdk>/ndk/<ndk_version>/prebuilt/linux-x86_64/bin/make
|
||||
|
||||
The easiest way is to set the PATH environment to <path_to_android_sdk>/ndk/<ndk_version>/prebuilt/linux-x86_64/bin.
|
||||
If you not set the PATH environment you should add -DCMAKE_MAKE_PROGRAM=<path_to_android_sdk>/ndk/<ndk_version>/prebuilt/linux-x86_64/bin/make
|
||||
as parameter for cmake.
|
||||
|
||||
The toolchain file can be found in the android NDK:
|
||||
<path_to_android_sdk>/ndk-bundle/build/cmake/android.toolchain.cmake
|
||||
or
|
||||
<path_to_android_sdk>/ndk/<ndk_version>/build/cmake/android.toolchain.cmake
|
||||
|
||||
To build poco with the default value from the NDK:
|
||||
|
||||
cmake -H<path_to_poco_sourcen> -B<path_to_build_dir>/poco_build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=<path_to_android_sdk>/ndk-bundle/build/cmake/android.toolchain.cmake
|
||||
|
||||
The prefered way is to build with ninja:
|
||||
|
||||
cmake -H<path_to_poco_sourcen> -B<path_to_build_dir>/poco_build -G'Ninja' -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=<path_to_android_sdk>/ndk-bundle/build/cmake/android.toolchain.cmake
|
||||
|
||||
To build with the tools from the Android SDK:
|
||||
|
||||
<path_to_android_sdk>/cmake/<cmake_version>/bin/cmake
|
||||
-H<path_to_poco_sourcen>
|
||||
-B/tmp/poco-build
|
||||
-G'Ninja'
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_MAKE_PROGRAM=<path_to_android_sdk>/cmake/<cmake_version>/bin/ninja
|
||||
-DCMAKE_TOOLCHAIN_FILE=<path_to_android_sdk>/ndk-bundle/build/cmake/android.toolchain.cmake
|
||||
|
||||
If you didn't set the <*ANDROID_NATIVE_API_LEVEL*> and <*ANDROID_ABI*> the android toolchain is using the default values.
|
||||
How to set <*ANDROID_NATIVE_API_LEVEL*> and <*ANDROID_ABI*> and what are the default values you can read this in the Android NDK documentation:
|
||||
https://developer.android.com/ndk/guides/cmake#options
|
||||
|
||||
To set poco build options see in GettingStarted.page#Building using CMake
|
||||
|
||||
!!!Restrictions
|
||||
|
||||
For the most part, the Linux and Android ports of the POCO C++ Libraries are very similar.
|
||||
However, there are a few restrictions due to the Binoic C library used by Android.
|
||||
|
||||
!!Poco::NamedEvent and Poco::NamedMutex
|
||||
|
||||
These classes are not supported on Android. While Poco::NamedEvent and
|
||||
Poco::NamedMutex objects can be created, any attempt to call a method
|
||||
of these classes will result in a Poco::NotImplementedException being thrown.
|
||||
|
||||
!!Poco::SharedMemory
|
||||
|
||||
Shared memory is not supported on Android.
|
||||
|
||||
!!Poco::FPEnvironment
|
||||
|
||||
The Poco::FPEnvironment class is not available on Android and
|
||||
cannot be used.
|
||||
|
||||
!!Poco::RWLock
|
||||
|
||||
On Android, Poco::RWLock is an ordinary mutex.
|
299
vendor/POCO/doc/Acknowledgements.html
vendored
Normal file
299
vendor/POCO/doc/Acknowledgements.html
vendored
Normal file
@ -0,0 +1,299 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>POCO C++ Libraries - Acknowledgements</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<meta NAME="author" CONTENT="Applied Informatics">
|
||||
<meta NAME="copyright" CONTENT="Applied Informatics">
|
||||
<meta NAME="language" CONTENT="en">
|
||||
<meta NAME="date" CONTENT="2005-02-21">
|
||||
</head>
|
||||
|
||||
<body text="black" bgcolor="white">
|
||||
|
||||
<h1>Acknowledgements</h1>
|
||||
|
||||
<p>Portions of the POCO C++ Libraries utilize the
|
||||
following copyrighted material, the use of which is hereby acknowledged.</p>
|
||||
|
||||
<h3>Expat XML Parser Toolkit 2.2</h3>
|
||||
|
||||
<pre>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
and Clark Cooper
|
||||
Copyright (c) 2001, 2002, 2003 Expat maintainers.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
</pre>
|
||||
|
||||
|
||||
<h3>Code from the FreeBSD Project</h3>
|
||||
|
||||
<pre>Copyright (c) 1983, 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
4. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.</pre>
|
||||
|
||||
|
||||
<h3>MD4 (RFC 1320) Message-Digest Algorithm</h3>
|
||||
|
||||
<pre>Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD4 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.</pre>
|
||||
|
||||
|
||||
<h3>MD5 (RFC 1321) Message-Digest Algorithm</h3>
|
||||
|
||||
<pre>Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.</pre>
|
||||
|
||||
|
||||
<h3>Perl Compatible Regular Expressions (PCRE) 8.41</h3>
|
||||
|
||||
<pre>PCRE is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Release 5 of PCRE is distributed under the terms of the "BSD" licence, as
|
||||
specified below. The documentation for PCRE, supplied in the "doc"
|
||||
directory, is distributed under the same terms as the software itself.
|
||||
|
||||
Written by: Philip Hazel <ph10@cam.ac.uk>
|
||||
|
||||
University of Cambridge Computing Service,
|
||||
Cambridge, England. Phone: +44 1223 334714.
|
||||
|
||||
Copyright (c) 1997-2014 University of Cambridge
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
</pre>
|
||||
|
||||
|
||||
<h3>zlib 1.2.11</h3>
|
||||
<pre>Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly jloup@gzip.org
|
||||
Mark Adler madler@alumni.caltech.edu</pre>
|
||||
|
||||
|
||||
<h3>SQLite 3.22.0</h3>
|
||||
<p>The original author of SQLite has dedicated the code to the
|
||||
<a href="http://www.sqlite.org/copyright.html">public domain</a>.
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the
|
||||
original SQLite code, either in source code form or as a compiled binary,
|
||||
for any purpose, commercial or non-commercial, and by any means.
|
||||
</p>
|
||||
|
||||
|
||||
<h3>double-conversion</h3>
|
||||
<p><pre>Copyright 2010 the V8 project authors. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</pre></p>
|
||||
|
||||
<h3>Public Domain JSON Parser for C (<a href="https://github.com/skeeto/pdjson">pdjson</a>)</h3>
|
||||
<p><pre>This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
</pre></p>
|
||||
|
||||
<h3>Code from the LLVM Compiler Infrastructure</h3>
|
||||
<p><pre>University of Illinois/NCSA
|
||||
Open Source License
|
||||
|
||||
Copyright (c) 2007-2012 University of Illinois at Urbana-Champaign.
|
||||
All rights reserved.
|
||||
|
||||
Developed by:
|
||||
|
||||
LLVM Team
|
||||
|
||||
University of Illinois at Urbana-Champaign
|
||||
|
||||
http://llvm.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal with
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimers.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimers in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the names of the LLVM Team, University of Illinois at
|
||||
Urbana-Champaign, nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this Software without specific
|
||||
prior written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||
SOFTWARE.
|
||||
</pre></p>
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
vendor/POCO/doc/CppCodingStyleGuide.doc
vendored
Normal file
BIN
vendor/POCO/doc/CppCodingStyleGuide.doc
vendored
Normal file
Binary file not shown.
BIN
vendor/POCO/doc/images/logo.png
vendored
Normal file
BIN
vendor/POCO/doc/images/logo.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
vendor/POCO/doc/images/overview.png
vendored
Normal file
BIN
vendor/POCO/doc/images/overview.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user