Skip to content

Commit 465dcc4

Browse files
committed
DOC: Improve CMakeLists.txt for README
1 parent 6fc893d commit 465dcc4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Your `CMakeLists.txt` should look something like the following:
1818

1919
```cmake
2020
# CMakeLists.txt
21+
cmake_minimum_required(VERSION 3.14)
22+
23+
project(databento_example)
2124
include(FetchContent)
2225
2326
FetchContent_Declare(
@@ -27,8 +30,8 @@ FetchContent_Declare(
2730
)
2831
FetchContent_MakeAvailable(databento)
2932
30-
add_library(my_library)
31-
target_link_libraries(my_library PRIVATE databento::databento)
33+
add_executable(example main.cpp)
34+
target_link_libraries(example PRIVATE databento::databento)
3235
```
3336

3437
Alternatively, you can clone the source code from GitHub [here](https://github.com/databento/databento-cpp).
@@ -52,7 +55,7 @@ In your project's `CMakeLists.txt`, add the following:
5255
```cmake
5356
# CMakeLists.txt
5457
find_package(databento REQUIRED)
55-
target_link_libraries(your_target PRIVATE databento::databento)
58+
target_link_libraries(example PRIVATE databento::databento)
5659
```
5760

5861
### Dependencies

0 commit comments

Comments
 (0)