readme: Add a section on CMake usage

This commit is contained in:
Patryk Wychowaniec 2023-07-01 18:30:32 +02:00
parent ad0240bbc9
commit 711ebec4c2
2 changed files with 50 additions and 0 deletions

View file

@ -287,6 +287,31 @@ naersk.buildPackage {
}
```
### Using CMake
If your application uses CMake, the build process might fail, saying:
```
CMake Error: The current CMakeCache.txt directory ... is different than the directory ... where CMakeCache.txt was created.
```
You can fix this problem by removing stale `CMakeCache.txt` files before the
build:
``` nix
naersk.buildPackage {
# ...
preBuild = ''
find \
-name CMakeCache.txt \
-exec rm {} \;
'';
}
```
([context](https://github.com/nix-community/naersk/pull/288))
### Using OpenSSL
If your application uses OpenSSL (making the build process fail), try:

View file

@ -249,6 +249,31 @@ naersk.buildPackage {
}
```
### Using CMake
If your application uses CMake, the build process might fail, saying:
```
CMake Error: The current CMakeCache.txt directory ... is different than the directory ... where CMakeCache.txt was created.
```
You can fix this problem by removing stale `CMakeCache.txt` files before the
build:
``` nix
naersk.buildPackage {
# ...
preBuild = ''
find \
-name CMakeCache.txt \
-exec rm {} \;
'';
}
```
([context](https://github.com/nix-community/naersk/pull/288))
### Using OpenSSL
If your application uses OpenSSL (making the build process fail), try: