Skip to content

Commit 78c3bb2

Browse files
committed
Include reference to integration example file
1 parent aa51f95 commit 78c3bb2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,7 @@ The headers `common.h` and `colors.h` include a number of utilities we use in ou
20502050

20512051
If you are interested in understanding how the library works, you can read the details in the complete [article](docs/README.md). It describes the relationship between its main objects, the backend interface, how to create new plot categories, limitations, and compares this library with similar alternatives.
20522052
<!-- END mdsplit-ignore -->
2053+
20532054
## Integration
20542055

20552056
### Binary Packages
@@ -2058,7 +2059,7 @@ Get the binary package from the [release section](https://github.com/alandefreit
20582059

20592060
If you need a more recent version of Matplot++, you can download the [binary packages from the CI artifacts](https://github.com/alandefreitas/matplotplusplus/actions?query=workflow%3AMatplotplusplus+event%3Apush) or build the library [from the source files](#build-from-source).
20602061

2061-
Once the package is installed, you can link your C++ program to the library and include the directories where you installed Matplot++. Unless you changed the default options, the library is likely to be in `/usr/local/` (Linux / Mac OS) or `C:/Program Files/` (Windows). The installer will try to find the directory where you usually keep your libraries but that's not always perfect.
2062+
Once the package is installed, you can link your C++ program to the library and include the directories where you installed Matplot++. Unless you changed the default options, the library is likely to be in `/usr/local/` (Linux / Mac OS) or `C:/Program Files/` (Windows). The installer will try to find the directory where you usually keep your libraries but that's not always perfect.
20622063

20632064
If you are using CMake, you can then find Matplot++ with the usual `find_package` command:
20642065

@@ -2068,7 +2069,9 @@ find_package(Matplot++ REQUIRED)
20682069
target_link_libraries(my_target PUBLIC Matplot++::matplot)
20692070
```
20702071

2071-
CMake should be able to locate the `matplot++-config.cmake` script automatically if you installed the library under `/usr/local/` (Linux / Mac OS) or `C:/Program Files/` (Windows). Otherwise, you need to include your installation directory in `CMAKE_MODULE_PATH` first:
2072+
You can see a complete example in [`test/integration/CMakeLists.txt`](test/integration/CMakeLists.txt).
2073+
2074+
CMake should be able to locate the `matplot++-config.cmake` script automatically if you installed the library under `/usr/local/` (Linux / Mac OS) or `C:/Program Files/` (Windows). Otherwise, if the library is under another directory, like `C:/Program Files (x86)` or `C:/Program Files (x86)/`, you need to include your installation directory in `CMAKE_MODULE_PATH` first:
20722075

20732076
```cmake
20742077
list(APPEND CMAKE_MODULE_PATH put/your/installation/directory/here)

0 commit comments

Comments
 (0)