Skip to content

Commit da63824

Browse files
committed
Minor update to readme install instructions.
1 parent 77e5150 commit da63824

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

README.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,28 +194,13 @@ Installation is optional and typically not required when using CPM. If you need
194194

195195
```bash
196196
# Build and install to default system location
197-
cmake --preset=default
198-
cmake --build --preset=default
199-
cmake --install build/default
200-
201-
# Install to custom prefix
202-
cmake --install build/default --prefix /opt/mylib
203-
```
204-
205-
**Testing your installation:**
206-
207-
Use the `install` preset to verify that installed packages can be found correctly:
208-
209-
```bash
210-
# Build with CPM_USE_LOCAL_PACKAGES to test finding installed dependencies
211197
cmake --preset=install
212198
cmake --build --preset=install
199+
cmake --install build/install
213200

214-
# Install and test
215-
cmake --install build/install --prefix /tmp/test-install
216-
CMAKE_PREFIX_PATH=/tmp/test-install cmake --preset=install
201+
# Install to custom prefix
202+
cmake --install build/install --prefix /opt/mylib
217203
```
218-
219204
The `install` preset enables `CPM_USE_LOCAL_PACKAGES`, which makes CPM call `find_package()` first before fetching. This verifies your generated Config.cmake works correctly.
220205

221206
For information about using installed packages with `find_package()`, see the [CPM.cmake documentation](https://github.com/cpm-cmake/CPM.cmake) about [controlling how dependencies are found](https://github.com/cpm-cmake/CPM.cmake#cpm_use_local_packages).

0 commit comments

Comments
 (0)