Giter Site home page Giter Site logo

hoehermann / purple-cmake-template Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 32 KB

Use CMake to build Pidgin 2 (libpurple 2) protocol plug-ins in a way that does not suck.

License: GNU General Public License v3.0

CMake 62.76% C 27.82% Batchfile 9.42%
libpurple pidgin pidgin-plugins libpurple-plugin pidgin-plugin

purple-cmake-template's Introduction

This script uses CMake to build a Pidgin 2 (libpurple 2) protocol plug-in in a way that does not suck.
Because having one Makefile for each toolchain is annoying.

On Windows, this script will automatically setup a development environment. These compilers are known to work:

These compilers are noteworthy:

  • MinGW with gcc 9.2.0 was used in the past.
  • MinGW with gcc 4.7.2 is recommended by Pidgin developers, but never used with this script.

Note: Any binary produced by at least gcc 7.1.0 or newer may need static linkage of libgcc for proper distribution. This script does not take care of this setting.

This script is used in purple-whatsmeow and purple-presage.

Linux:

  1. Configure project. Specify the path to this script:

     cmake -DPurple_DIR=…/purple-cmake ..
    
  2. Build project:

     cmake --build .
    
  3. Install binaries system-wide:

     sudo cmake --install .
    

Note: During the configuration step, you can override PURPLE_DATA_DIR and PURPLE_PLUGIN_DIR request preparing a user-based installation:

cmake -DPurple_DIR=…/purple-cmake -DPURPLE_DATA_DIR:PATH=/.local/share -DPURPLE_PLUGIN_DIR:PATH=/.purple/plugins ..

You can then execute cmake --install . without sudo.

Windows

  1. Configure:

    This will set-up a development environment including a pidgin installation in your build directory.

     cmake -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" ..
    

    Note: You can use vcpkg-managed packages by adding the path like this:

     -DCMAKE_TOOLCHAIN_FILE="…/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_MANIFEST_MODE=OFF
    

    Use x86-mingw-static for MinGW builds. Use x86-windows-static for MSVC builds.

  2. Build:

     cmake --build .
    
  3. Install:

    This will install into the pidgin installation in your build directory.

     cmake --install .
    
  4. Execute:

    This will execute the Pidgin installation.

     cmake --build . --target run
    

    Note: You can specify the purple user configuration directory to be used by the run target:

     -DPurple_CONFIG_DIR=…/.purple
    

Note: Building on Windows is most reliable when there are no existing installations of Pidgin, GTK+ and/or libgcc in your PATH.

purple-cmake-template's People

Contributors

hoehermann avatar

Stargazers

 avatar  avatar

Watchers

 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.