Files
omath/docs/install.md
Orange d12a2611b8 Moves images to improved documentation structure
Moves various image files demonstrating libomath’s usage and featuring artwork from showcases to the improved `docs/images` structure to reorganize the project's documentation in a logical and maintainable fashion.

This change ensures consistency and simplifies updating documentation assets.
2025-10-31 16:47:28 +03:00

2.2 KiB

Installation

Using vcpkg

Note: Support vcpkg for package management

  1. Install vcpkg
  2. Run the following command to install the orange-math package:
vcpkg install orange-math

CMakeLists.txt

find_package(omath CONFIG REQUIRED)
target_link_libraries(main PRIVATE omath::omath)

For detailed commands on installing different versions and more information, please refer to Microsoft's official instructions.

Using xrepo

Note: Support xrepo for package management

  1. Install xmake
  2. Run the following command to install the omath package:
xrepo install omath

xmake.lua

add_requires("omath")
target("...")
    add_packages("omath")

Build from source using CMake

  1. Preparation

    Install needed tools: cmake, clang, git, msvc (windows only).

    1. Linux:

      sudo pacman -Sy cmake ninja clang git
      
    2. MacOS:

      brew install llvm git cmake ninja
      
    3. Windows:

      Install Visual Studio from here and Git from here.

      Use x64 Native Tools shell to execute needed commands down below.

  2. Clone the repository:

    git clone https://github.com/orange-cpp/omath.git
    
  3. Navigate to the project directory:

    cd omath
    
  4. Build the project using CMake:

    cmake --preset windows-release -S .
    cmake --build cmake-build/build/windows-release --target omath -j 6
    

    Use <platform>-<build configuration> preset to build suitable version for yourself. Like windows-release or linux-release.

    | Platform Name | Build Config | |---------------|---------------| | windows | release/debug | | linux | release/debug | | darwin | release/debug |