Skip to content

Commit 7c7bc27

Browse files
authored
Merge pull request #2 from ThatOneCalculator/cmake
Add CMake config
2 parents 0ddd18e + 6bd98ec commit 7c7bc27

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
project(bbfmux)
3+
4+
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6+
7+
find_package(Threads REQUIRED)
8+
9+
add_executable(bbfmux
10+
src/bbfenc.cpp
11+
src/libbbf.cpp
12+
src/xxhash.c
13+
)
14+
15+
target_link_libraries(bbfmux PRIVATE Threads::Threads)
16+
17+
if(WIN32)
18+
target_compile_options(bbfmux PRIVATE -municode)
19+
endif()
20+
21+
install(TARGETS bbfmux DESTINATION bin)

readme.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,21 @@ Bound Book Format (.bbf) is a high-performance binary container designed specifi
1313
## Getting Started
1414

1515
### Prerequisites
16-
- C++17 compliant compiler (GCC/Clang/MSVC)
16+
- C++17 compliant compiler (GCC/Clang/MSVC), and optionally CMake
1717
- [xxHash](https://github.com/Cyan4973/xxHash) library
1818

1919
### Compilation
20+
21+
#### CMake
22+
23+
```bash
24+
cmake -B build
25+
cmake --build build
26+
sudo cmake --install build
27+
```
28+
29+
#### Manual
30+
2031
Linux
2132
```bash
2233
g++ -std=c++17 bbfenc.cpp libbbf.cpp xxhash.c -o bbfmux -pthread

0 commit comments

Comments
 (0)