Skip to content

Commit faeef59

Browse files
committed
moved installation stuff to INSTALL.md
1 parent 40a3011 commit faeef59

File tree

2 files changed

+56
-33
lines changed

2 files changed

+56
-33
lines changed

INSTALL.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# 📥Installation Guide
2+
3+
## <img width="28px" src="https://vcpkg.io/assets/mark/mark.svg" /> Using vcpkg
4+
**Note**: Support vcpkg for package management
5+
1. Install [vcpkg](https://github.com/microsoft/vcpkg)
6+
2. Run the following command to install the orange-math package:
7+
```
8+
vcpkg install orange-math
9+
```
10+
CMakeLists.txt
11+
```cmake
12+
find_package(omath CONFIG REQUIRED)
13+
target_link_libraries(main PRIVATE omath::omath)
14+
```
15+
For detailed commands on installing different versions and more information, please refer to Microsoft's [official instructions](https://learn.microsoft.com/en-us/vcpkg/get_started/overview).
16+
17+
## <img width="28px" src="https://upload.wikimedia.org/wikipedia/commons/e/ef/CMake_logo.svg?" /> Build from source using CMake
18+
1. **Preparation**
19+
20+
Install needed tools: cmake, clang, git, msvc (windows only).
21+
22+
1. **Linux:**
23+
```bash
24+
sudo pacman -Sy cmake ninja clang git
25+
```
26+
2. **MacOS:**
27+
```bash
28+
brew install llvm git cmake ninja
29+
```
30+
3. **Windows:**
31+
32+
Install Visual Studio from [here](https://visualstudio.microsoft.com/downloads/) and Git from [here](https://git-scm.com/downloads).
33+
34+
Use x64 Native Tools shell to execute needed commands down below.
35+
2. **Clone the repository:**
36+
```bash
37+
git clone https://github.com/orange-cpp/omath.git
38+
```
39+
3. **Navigate to the project directory:**
40+
```bash
41+
cd omath
42+
```
43+
4. **Build the project using CMake:**
44+
```bash
45+
cmake --preset windows-release -S .
46+
cmake --build cmake-build/build/windows-release --target omath -j 6
47+
```
48+
Use **\<platform\>-\<build configuration\>** preset to build siutable version for yourself. Like **windows-release** or **linux-release**.
49+
50+
| Platform Name | Build Config |
51+
|---------------|---------------|
52+
| windows | release/debug |
53+
| linux | release/debug |
54+
| darwin | release/debug |

README.md

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,9 @@ Oranges's Math Library (omath) is a comprehensive, open-source library aimed at
3737
| Linux | ✅YES |
3838
| Darwin (MacOS) | ✅YES |
3939

40-
## ⏬ Getting Started
41-
### Prerequisites
42-
- C++ Compiler
43-
- CMake (for building the project)
40+
## ⏬ Installation
41+
Please read our [installation guide](https://github.com/orange-cpp/omath/blob/main/INSTALL.md). If this link doesn't work check out INSTALL.md file.
4442

45-
### Installation
46-
### vcpkg
47-
**Note**: Support vcpkg for package management
48-
1. Install vcpkg (https://github.com/microsoft/vcpkg)
49-
2. Run the following command to install the orange-math package:
50-
```
51-
vcpkg install orange-math
52-
```
53-
CMakeLists.txt
54-
```cmake
55-
find_package(omath CONFIG REQUIRED)
56-
target_link_libraries(main PRIVATE omath::omath)
57-
```
58-
For detailed commands on installing different versions and more information, please refer to Microsoft's official instructions (https://learn.microsoft.com/en-us/vcpkg/get_started/overview)
59-
### Build from source
60-
1. Clone the repository:
61-
```
62-
git clone https://github.com/orange-cpp/omath.git
63-
```
64-
2. Navigate to the project directory:
65-
```
66-
cd omath
67-
```
68-
3. Build the project using CMake:
69-
```
70-
cmake --preset windows-release -S .
71-
cmake --build cmake-build/build/windows-release --target omath -j 6
72-
```
73-
Use **\<platform\>-\<build configuration\>** preset to build siutable version for yourself. Like **windows-release** or **linux-release**.
7443
## ❔ Usage
7544
Simple world to screen function
7645
```c++

0 commit comments

Comments
 (0)