Skip to content

Commit

Permalink
readme: Add a section on CMake usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Patryk27 committed Jul 26, 2023
1 parent ad0240b commit 711ebec
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
25 changes: 25 additions & 0 deletions README.tpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 711ebec

Please sign in to comment.