eutro / cppemacs

C++11 API wrapper for Emacs dynamic modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cppemacs

cppemacs is a C++11 API wrapper for writing Emacs dynamic modules.

See the documentation for usage and examples.

Obtaining

Manually

This library is just the set of headers found in include/. Feel free to copy these files and use them elsewhere (preferably along with COPYING).

With CMake

Locally

You can add cppemacs to your CMake project in a few different ways, such as git submodules or FetchContent, depending on your CMake version.

For example, on CMake 3.14+:

find_package(cppemacs CONFIG) # try to use a system installation first
# (if using CMake 3.24 or newer, you can use FIND_PACKAGE_ARGS in FetchContent_Declare instead)

if(NOT cppemacs_FOUND) # fall back to downloading
  include(FetchContent) # (CMake 3.11)
  FetchContent_Declare(
    cppemacs
    GIT_REPOSITORY https://github.com/eutro/cppemacs
    GIT_TAG main
  )
  FetchContent_MakeAvailable(cppemacs) # (CMake 3.14)
endif()

# add includes to your Emacs dynamic module
add_library(your_emacs_module SHARED)
target_link_libraries(your_emacs_module PRIVATE cppemacs)

Globally

CMake can be used to install cppemacs system-wide (or otherwise).

From the directory containing cppemacs sources:

# configure, add extra flags like '-GNinja' here
cmake -Bbuild .

# build tests/documentation/etc
cmake --build build

# run tests
cmake --build build -t test

# install system-wide (may need run as root)
cmake --install build --prefix=/path/to/prefix # e.g. /opt/cppemacs

cppemacs-specific configure flags:

  • -DCPPEMACS_Test=OFF do not build tests.

  • -DCPPEMACS_Coverage=ON build tests with code coverage

  • -DCPPEMACS_Documentation=ON build documentation, using doxygen.

  • -DCPPEMACS_Install=OFF do not add installation rules

About

C++11 API wrapper for Emacs dynamic modules

License:GNU General Public License v3.0


Languages

Language:C++ 66.8%Language:CMake 26.1%Language:Emacs Lisp 6.4%Language:Makefile 0.6%