All Projects → dmitigr → cpplipa

dmitigr / cpplipa

Licence: Zlib License
C++ library package

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to cpplipa

italy
Free open public domain football data (football.db) for Italy / Europe - Serie A etc.
Stars: ✭ 35 (+105.88%)
Mutual labels:  sqlite
anikimiapi
A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime.
Stars: ✭ 15 (-11.76%)
Mutual labels:  url
sqlite-vtfunc
Implement SQLite table-valued functions with Python
Stars: ✭ 45 (+164.71%)
Mutual labels:  sqlite
postcss-inline-base64
PostCSS plugin used to replace value inside of url function to base64
Stars: ✭ 23 (+35.29%)
Mutual labels:  url
INTER-Mediator
The new style web application framework, you could develop a db-driven web application with declarative descriptions.
Stars: ✭ 27 (+58.82%)
Mutual labels:  sqlite
uri-parse-lib
Library for parse URI
Stars: ✭ 24 (+41.18%)
Mutual labels:  url
sqlite-dotnet-core
.NET Core 2.1 Console Application using SQLite with Entity Framework and Dependency Injection
Stars: ✭ 17 (+0%)
Mutual labels:  sqlite
chiselstore
SQLite + Little Raft = 🚀
Stars: ✭ 398 (+2241.18%)
Mutual labels:  sqlite
node-parameterize
parameterize.js
Stars: ✭ 36 (+111.76%)
Mutual labels:  url
FastCGI
FastCGI client library for .NET
Stars: ✭ 23 (+35.29%)
Mutual labels:  fastcgi
room-populate-demo
Room database pre-population demo
Stars: ✭ 17 (+0%)
Mutual labels:  sqlite
TwitterPiBot
A Python based bot for Raspberry Pi that grabs tweets with a specific hashtag and reads them out loud.
Stars: ✭ 85 (+400%)
Mutual labels:  sqlite
trym
🔗 A modern URL shortener
Stars: ✭ 29 (+70.59%)
Mutual labels:  url
mdb2sqlite
Conversion tool used to convert microsoft access database to sqlite.
Stars: ✭ 79 (+364.71%)
Mutual labels:  sqlite
dbd
dbd is a database prototyping tool that enables data analysts and engineers to quickly load and transform data in SQL databases.
Stars: ✭ 30 (+76.47%)
Mutual labels:  sqlite
Slugify
Simple Slug / Clean URL generator helper for Microsoft .NET framework / .NET Standard.
Stars: ✭ 53 (+211.76%)
Mutual labels:  url
verneuil
Verneuil is a VFS extension for SQLite that asynchronously replicates databases to S3-compatible blob stores.
Stars: ✭ 169 (+894.12%)
Mutual labels:  sqlite
urley
📦 An easy cross-platform utility library to work with URLs in Javascript.
Stars: ✭ 14 (-17.65%)
Mutual labels:  url
sqlite-unity-plugin-example
An Example implementation of the sqlite database plugin in C# unity: https://github.com/rizasif/sqlite-unity-plugin
Stars: ✭ 29 (+70.59%)
Mutual labels:  sqlite
pocket-to-sqlite
Create a SQLite database containing data from your Pocket account
Stars: ✭ 56 (+229.41%)
Mutual labels:  sqlite

C++ library package

dmitigr::cpplipa (lipa - is an abbreviation of "library package") - is a package of C++ libraries, including:

All of these libraries can be used as shared libraries, static libraries or header-only libraries.

Some of these libraries are available as derived library packages:

Unbundled third-party dependencies

Bundled third-party dependencies

Name Source
RapidJSON https://github.com/dmitigr/rapidjson/tree/master
uSockets https://github.com/dmitigr/uSockets/tree/master
uWebSockets https://github.com/dmitigr/uWebSockets/tree/master

CMake options

The table below (one may need to use horizontal scrolling for full view) contains variables which can be passed to CMake for customization.

CMake variable Possible values Default on Unix Default on Windows
The flag to use libc++ with Clang
DMITIGR_CPPLIPA_CLANG_USE_LIBCPP On | Off On On
The flag to only install the header-only libraries
DMITIGR_CPPLIPA_HEADER_ONLY On | Off Off Off
The flag to build the tests
DMITIGR_CPPLIPA_TESTS On | Off On On
The flag to link to OpenSSL
DMITIGR_CPPLIPA_OPENSSL On | Off Off Off
The flag to link to zlib
DMITIGR_CPPLIPA_ZLIB On | Off Off Off
The flag to build the shared libraries
BUILD_SHARED_LIBS On | Off Off Off
The flag to be verbose upon build
CMAKE_VERBOSE_MAKEFILE On | Off On On
The type of the build
CMAKE_BUILD_TYPE Debug | Release | RelWithDebInfo | MinSizeRel Debug Debug
Installation directories
CMAKE_INSTALL_PREFIX an absolute path "/usr/local" "%ProgramFiles%\dmitigr_cpplipa"
DMITIGR_CPPLIPA_SHARE_INSTALL_DIR a path relative to CMAKE_INSTALL_PREFIX "share/dmitigr_cpplipa" "."
DMITIGR_CPPLIPA_CMAKE_INSTALL_DIR a path relative to CMAKE_INSTALL_PREFIX "${DMITIGR_CPPLIPA_SHARE_INSTALL_DIR}/cmake" "cmake"
DMITIGR_CPPLIPA_DOC_INSTALL_DIR a path relative to CMAKE_INSTALL_PREFIX "${DMITIGR_CPPLIPA_SHARE_INSTALL_DIR}/doc" "doc"
DMITIGR_CPPLIPA_LIB_INSTALL_DIR a path relative to CMAKE_INSTALL_PREFIX "lib" "lib"
DMITIGR_CPPLIPA_INCLUDE_INSTALL_DIR a path relative to CMAKE_INSTALL_PREFIX "include" "include"
Options of the libpq
Pq_ROOT a path not set (rely on CMake) not set (rely on CMake)
Options of the libuv
Uv_ROOT a path not set (rely on CMake) not set (rely on CMake)
Options of the OpenSSL
OpenSSL_ROOT a path not set (rely on CMake) not set (rely on CMake)
Options of the SQLite
SQLite3_ROOT a path not set (rely on CMake) not set (rely on CMake)
Options of the zlib
zlib_ROOT a path not set (rely on CMake) not set (rely on CMake)

Remarks

  • <Lib>_ROOT specifies a prefix for both binary and headers of the <Lib>. For example, if PostgreSQL installed relocatably into /usr/local/pgsql, the value of Pq_ROOT should be set accordingly;
  • when building with Microsoft Visual Studio the value of CMAKE_BUILD_TYPE doesn't selects the build configuration within the generated build environment. The CMake command line option --config should be used for that purpose.

Installation

Library package can be installed as a set of:

  • shared libraries if -DBUILD_SHARED_LIBS=ON option is specified;
  • static libraries if -DBUILD_SHARED_LIBS=OFF option is specified (the default);
  • header-only libraries if -DDMITIGR_CPPLIPA_HEADER_ONLY=ON option is specified.

The default build type is Debug.

Installation on Linux

$ git clone https://github.com/dmitigr/cpplipa.git
$ mkdir cpplipa/build
$ cd cpplipa/build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build . --parallel
$ cmake sudo make install

Installation on Microsoft Windows

Run the Developer Command Prompt for Visual Studio and type:

> git clone https://github.com/dmitigr/cpplipa.git
> mkdir cpplipa\build
> cd cpplipa\build
> cmake -A x64 ..
> cmake --build . --config Release --parallel

Next, run the elevated command prompt (i.e. the command prompt with administrator privileges) and type:

> cmake --install .

Alternatively, one of the following build commands may be used: > cmake --build . --config Release --target install or > cmake -DBUILD_TYPE=Release -P cmake_install.cmake

A bitness of the target architecture must corresponds to the bitness of external dependencies!

To make installed DLLs available for any application that depends on it, symbolic links can be created:

  • in %SYSTEMROOT%\System32 for a 64-bit DLL on a 64-bit host (or for the 32-bit DLL on the 32-bit host);
  • in %SYSTEMROOT%\SysWOW64 for the 32-bit DLL on 64-bit host.

For example, to create the symbolic link to dmitigr_pgfe.dll, the mklink command can be used in the elevated command prompt:

> cd /d %SYSTEMROOT%\System32
> mklink dmitigr_pgfe.dll "%ProgramFiles%\dmitigr_cpplipa\lib\dmitigr_pgfe.dll"

Usage

Assuming foo is the name of library, the following considerations should be followed:

  • headers other than dmitigr/foo/foo.hpp should not be used since these headers are subject to reorganize;
  • namespace dmitigr::foo::detail should not be used directly since it consists of the implementation details.

Usage with CMake

With CMake it's pretty easy to use the libraries (including derived versions) in two ways: as a system-wide installed library(-es) or as a library(-es) dropped into the project source directory.

The code below demonstrates how to import system-wide installed libraries by using CMake (this snippet is also valid when using the derived library package(s)):

cmake_minimum_required(VERSION 3.16)
project(foo)
find_package(dmitigr_cpplipa REQUIRED COMPONENTS fcgi pgfe)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(foo foo.cpp)
target_link_libraries(foo dmitigr_fcgi dmitigr_pgfe)

The next code demonstrates how to import the derived Pgfe library package dropped directly into the project's source directory 3rdparty/pgfe:

set(DMITIGR_CPPLIPA_HEADER_ONLY ON CACHE BOOL "Header-only?")
add_subdirectory(3rdparty/pgfe)

Note, that all CMake variables described in CMake options are also valid for derived library packages.

Specifying a library type to use

It's possible to explicitly specify a type of library to use. To do it, the corresponding suffix of a component name should be specified:

  • the suffix "_shared" corresponds to shared libraries;
  • the suffix "_static" corresponds to static libraries;
  • the suffix "_interface" corresponds to header-only libraries.

For example, the code below demonstrates how to use the shared fcgi library and the header-only pgfe library in a same project side by side:

find_package(dmitigr_cpplipa REQUIRED COMPONENTS fcgi_shared pgfe_interface)
# ...
target_link_libraries(foo dmitigr_fcgi dmitigr_pgfe)

Note that libraries of the explicitly specified types must be installed to be found!

If the type of library is not specified (i.e. suffix of a component name is omitted), find_package() will try to import the first available library in the following order:

  1. a shared library;
  2. a static library;
  3. a header-only library.

Usage without CMake

It's possible to use the libraries without CMake. In order to use an any library of the package as header-only library, just copy the contents of the src directory to a project directory which is under an include path of a compiler, for example, src/3rdparty/dmitigr. Then, just include the header of the required library, for example:

#include "dmitigr/pgfe/pgfe.hpp"

int main()
{
  dmitigr::pgfe::Connection conn;
}

Please note, that external dependencies must be linked manually in this case. So, the snippet above could be compiled with the following command:

g++ -std=c++17 -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpq -ohello hello.cpp

Licenses and copyrights

All the libraries of the package itself (except the third-party software) is distributed under zlib LICENSE.

Third-party software are distributed under:

For conditions of distribution and use, please see the corresponding license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].