Skip to content

Commit

Permalink
📚 [README]
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-jusiak committed Aug 20, 2024
1 parent 11f0978 commit e6f7107
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions reflect
Original file line number Diff line number Diff line change
Expand Up @@ -492,23 +492,23 @@ reflect::for_each([&f](const auto I) {
}
```

- How to integrate with CMake/CPM?
- How to integrate with [CMake.FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html)?

```
CPMAddPackage(
Name reflect
GITHUB_REPOSITORY qlibs/reflect
include(FetchContent)

FetchContent_Declare(
qlibs.reflect
GIT_REPOSITORY https://github.com/qlibs/reflect
GIT_TAG v1.2.2
)
add_library(reflect INTERFACE)
target_include_directories(reflect SYSTEM INTERFACE ${reflect_SOURCE_DIR})
add_library(qlibs::reflect ALIAS reflect)

FetchContent_MakeAvailable(qlibs.reflect)
```

```
target_link_libraries(${PROJECT_NAME} qlibs::reflect);
target_link_libraries(${PROJECT_NAME} PUBLIC qlibs.reflect);
```

- Similar projects?
> [boost.pfr](https://github.com/boostorg/pfr), [glaze](https://github.com/stephenberry/glaze), [reflect-cpp](https://github.com/getml/reflect-cpp), [magic_enum](https://github.com/Neargye/magic_enum)
<!--
Expand Down

0 comments on commit e6f7107

Please sign in to comment.