Skip to content

Repository files navigation

Libmacro

Libmacro is a multi-platform, extendable macro and hotkey C library.

License

Libmacro uses the LGPL v2.1 license. Please refer to the LICENSE or lgpl-2.1.txt files for more information.

Supported compilers

  • GCC 4.8+
  • Visual Studio 2015+
  • Clang needs testing for version 3.3+

Supported cpack installer compilers

  • NSIS
  • More research required

Building source

Required build tools:

  • cmake
    • Optionally built with QtCreator or other IDE using cmake generators. Instructions not included.
    • Given build configuration <BUILD_TYPE> cmake and cpack may require the same command-line switch.
      • cmake: cmake --config <BUILD_TYPE>
      • cpack: cpack -C <BUILD_TYPE>
    • May have to set environment variables Qt6_DIR or Qt6Core_DIR, such as export Qt6_DIR=<cmake-dir>/Qt6
    • Alternatively one may set CMAKE_PREFIX_PATH where cmake is in the subdirectory <CMAKE_PREFIX_PATH>/lib/cmake/ and Qt6 cmake files are in the cmake subdirectory.
      • Example for windows, using QT 5.13.1 and MSVC 2017: "CMAKE_PREFIX_PATH=<QT directory>/5.13.1/msvc2017_64"
  • All makefile generators and build tools for your environment and target
  • cmake modules
    • Threads: Always required until further notice. Message loops may be an alternative in the future.
    • Git: Required for versioning
    • Qt6Core: Required for testing
    • Qt6Test: Required for testing

Supported optional cmake arguments

  • Default custom cmake options: -DBUILD_DOC=ON -DBUILD_PACKAGE=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON
    • For a debug build doc and packaging are turned off by default.
  • BUILD_DOC: Also build doxygen documentation.
  • BUILD_PACKAGE: Build packaging materials to use with cpack.
  • BUILD_SHARED_LIBS: A library that is not shared is static.
  • BUILD_TESTING: Also build test, development and debugging applications. automatically.
  • CMAKE_BUILD_TYPE: Debug or Release
  • CMAKE_CXX_COMPILER: GCC, Visual Compiler, or Clang executable
  • CMAKE_C_COMPILER: GCC, Visual Compiler, or Clang executable
  • CMAKE_INSTALL_PREFIX: Install location
  • CMAKE_PREFIX_PATH: Custom locations for headers, libraries, and QT version base directories.
  • Qt6_DIR, Qt6Core_DIR, Qt6Test_DIR: Qt cmake directories.
  • TEST_TERMINAL: Automated tests have access to a terminal. Not all tests will be run if no terminal is available.

Contributing

Please follow style guides when it makes sense. clang-format will be used for all style formatting and manual formatting will not be kept. The following are known style guidelines used in this project.

Style source

clang-format is required for correct formatting. scripts/style runs clang-format for all source files, with KNF options. Run from any directory to format any C and C++ header and source files in that directory. Run with scripts/style --help for more information.

Platform Style Guides

Internal API

Symbols in the mcr::internal namespace are library-internal and not part of the public API. Consumers must not depend on them.

About

Libmacro is a multi-platform, extendable macro and hotkey C library.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages