Skip to content

Commit ccd4b69

Browse files
authored
Add ASIO as 3rdparty dependency (#13)
1 parent 9535f61 commit ccd4b69

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

3rdparty/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
add_subdirectory(asio)
12
add_subdirectory(fmt)
23
add_subdirectory(libvips)

3rdparty/asio/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
include(FetchContent)
2+
FetchContent_Declare(
3+
asio_fetch
4+
GIT_REPOSITORY https://github.com/chriskohlhoff/asio
5+
GIT_TAG asio-1-24-0
6+
GIT_SHALLOW TRUE
7+
)
8+
FetchContent_GetProperties(asio_fetch)
9+
if(NOT asio_fetch_POPULATED)
10+
FetchContent_Populate(asio_fetch)
11+
12+
add_library(asio INTERFACE)
13+
target_include_directories(asio SYSTEM INTERFACE ${asio_fetch_SOURCE_DIR}/asio/include)
14+
target_compile_definitions(asio
15+
INTERFACE
16+
ASIO_DISABLE_VISIBILITY
17+
ASIO_NO_DEPRECATED
18+
ASIO_NO_DYNAMIC_BUFFER_V1
19+
ASIO_NO_TS_EXECUTORS
20+
ASIO_NO_TYPEID
21+
ASIO_STANDALONE)
22+
endif()

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ A tool for performing black and white Bayer dithering, written in C++17.
66
![GCC Build](https://github.com/nilssonk/vulkan-cpp/actions/workflows/gcc-build.yml/badge.svg)
77

88
### 2x2 Bayer Kernel
9+
910
![Dither 2x2 Kernel](.github/img/dither2.jpg)
1011

1112
### 4x4 Bayer Kernel
13+
1214
![Dither 4x4 Kernel](.github/img/dither4.jpg)
1315

1416
### 8x8 Bayer Kernel
17+
1518
![Dither 8x8 Kernel](.github/img/dither8.jpg)
1619

1720
## Usage
@@ -30,6 +33,8 @@ There are a few dependencies required to build this tool:
3033

3134
#### Bundled/Fetched by CMake
3235

36+
- ASIO (https://think-async.com/Asio)
37+
3338
- fmt (https://github.com/fmtlib/fmt)
3439

3540
#### Not included

0 commit comments

Comments
 (0)