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
- set project version (just 0 as dummy) and project description in CMake
- export CMake package fortran_lang-config.cmake for CMake projects
- export pkg-config file fortran_lang.pc for non-CMake projects
Copy file name to clipboardExpand all lines: README.md
+30
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,36 @@ make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4
85
85
```
86
86
Note that currently the minimum value for maximum rank is 4.
87
87
88
+
89
+
## Using stdlib in your project
90
+
91
+
The stdlib projects exports CMake package files and pkg-config files to make stdlib usable for other projects.
92
+
The package files are located in the library directory in the installation prefix.
93
+
94
+
For CMake builds of stdlib you can find a local installation with
95
+
96
+
```cmake
97
+
find_package(fortran_stdlib REQUIRED)
98
+
...
99
+
target_link_libraries(
100
+
${PROJECT_NAME}
101
+
PRIVATE
102
+
fortran_stdlib::fortran_stdlib
103
+
)
104
+
```
105
+
106
+
to make the installed stdlib project discoverable add the stdlib directory to the ``CMAKE_PREFIX_PATH``.
107
+
The usual install localtion of the package files is ``$PREFIX/lib/cmake/fortran_stdlib``.
108
+
109
+
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.
110
+
The usual install location of the pc-file is ``$PREFIX/lib/pkgconfig``.
111
+
In make you can obtain the required compile and link arguments with
0 commit comments