You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30
Original file line number
Diff line number
Diff line change
@@ -158,6 +158,36 @@ make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4
158
158
```
159
159
160
160
161
+
162
+
## Using stdlib in your project
163
+
164
+
The stdlib project exports CMake package files and pkg-config files to make stdlib usable for other projects.
165
+
The package files are located in the library directory in the installation prefix.
166
+
167
+
For CMake builds of stdlib you can find a local installation with
168
+
169
+
```cmake
170
+
find_package(fortran_stdlib REQUIRED)
171
+
...
172
+
target_link_libraries(
173
+
${PROJECT_NAME}
174
+
PRIVATE
175
+
fortran_stdlib::fortran_stdlib
176
+
)
177
+
```
178
+
179
+
To make the installed stdlib project discoverable add the stdlib directory to the ``CMAKE_PREFIX_PATH``.
180
+
The usual install localtion of the package files is ``$PREFIX/lib/cmake/fortran_stdlib``.
181
+
182
+
For non-CMake build systems (like make) you can use the exported pkg-config file by setting ``PKG_CONFIG_PATH`` to include the directory containing the exported pc-file.
183
+
The usual install location of the pc-file is ``$PREFIX/lib/pkgconfig``.
184
+
In make you can obtain the required compile and link arguments with
Documentation is a work in progress (see issue [#4](https://github.com/fortran-lang/stdlib/issues/4)) but already available at [stdlib.fortran-lang.org](https://stdlib.fortran-lang.org).
0 commit comments