Coder Social home page Coder Social logo

kicsyromy / libgearbox Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 449 KB

C++ library used for interacting with a remote Transmission server

License: MIT License

CMake 5.09% C++ 91.87% Objective-C 1.07% Python 1.96%
cpp-library transmission-daemon

libgearbox's Introduction

libGearBox

C++ library used for interacting with a remote Transmission server.

Building

Dependencies

The following combination of operating system and compiler are officially supported:

  • Windows (MinGW 4.9+, Microsoft Visual Studio 2015+)
  • Linux (GCC 4.9+, clang 3.8.1+) + cURL development libraries (libcurl4-openssl-dev on Ubuntu)
  • macOS (GCC 4.9+, clang 3.8.1+)

The project comes with all required (unless otherwise noted) dependencies as git submodules. In adition to these CMake is required to perform the actual build. Make sure that the cmake binary is in your PATH.

Extra dependencies

Tests:

  • Python (min v3.4) libraries

Code coverage:

  • gcov
  • lcov
  • GCC/Clang/MinGW compiler

Documentation:

  • Doxygen

Build steps

Clone the repository:

git clone https://github.com/kicsyromy/libGearBox.git
git submodule update --init

Note: Since CMake supports several Makefile formats, based on the target platform, I am not going to cover all of them here. Feel free to use the Visual Studio generator on Windows, or XCode generator on macOS. If a specific generator doesn't work for you please file a bug report.

All platforms

cd libGearBox
mkdir build
cd build

Windows

cmake .. -G "NMake Makefiles"
nmake

Linux

cmake .. -G "Unix Makefiles"
make -j $(grep -c ^processor /proc/cpuinfo)

macOS

cmake .. -G "Unix Makefiles"
make

The output of the build should be a static library called libgearbox with the appropriate extension (.lib on Windows, .a on Linux and macOS).

Build options

libGearBox supports some CMake options for a customized build. These are as follows:

LIBGEARBOX_STATIC_LIB Build static library if set to ON otherwise build shared library. Defaults to ON.

LIBGEARBOX_DEBUG_LOGS Build with additional debug logs. CAUTION: Do not use in production. Defaults to OFF.

LIBGEARBOX_ENABLE_TESTS Build tests. Defaults to OFF.

LIBGEARBOX_TESTS_ENABLE_CODE_COVERAGE Only available when building with tests. Enables code coverage generation using gcov/lcov.

LIBGEARBOX_GENERATE_DOCUMENTATION Generate HTML documentation, also builds manpages when building under Linux. Defaults to OFF.

Using as a build dependency for a bigger project

The easiest way to use the library for a bigger project is to add this repository as a git submodule and including the CMakeLists.txt file of this project as a subdirectory in your own CMakeLists.txt and adding a dependency to your own target to libgearbox.

...
add_subdirectory(libgearbox)
add_executable (myapp main.cpp src1.cpp src2.cpp)
target_link_libraries (myapp libgearbox)
...

Please be aware that while some effort was put into not polluting the global CMake namespace with all sorts of intermediary variables the following are still present in the global namespace:

  • The options mentined above
  • LIBGEARBOX_VERSION_MAJOR, LIBGEARBOX_VERSION_MINOR, LIBGEARBOX_VERSION_PATCH
  • LIBGEARBOX_PRIVATE_HEADERS, LIBGEARBOX_PUBLIC_HEADERS, LIBGEARBOX_SOURCES

Roadmap

TBD

Contributing

Contributions are welcome, documentation, tests, code fixes etc. For a guideline on how contributions work on GitHub visit https://help.github.com/articles/working-with-forks/ and https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/

libgearbox's People

Contributors

kicsyromy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.