Skip to content

Commit a362bdc

Browse files
committed
abort on CMake install w/ clear error
This updates the librustls CMakeLists.txt to abort on install. It's only intended to be used for the C examples, which we _don't_ want anyone to install anywhere! Use cargo capi for librustls, not cmake. ``` $ cmake --install build -- Install configuration: "Release" CMake Error at build/cmake_install.cmake:46 (message): librustls installation via CMake is not supported. Use 'cargo capi install' instead. See: https://github.com/rustls/rustls-ffi?tab=readme-ov-file#build-rustls-ffi ```
1 parent ff72516 commit a362bdc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

librustls/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ cmake_minimum_required(VERSION 3.15)
1414

1515
project(rustls-ffi)
1616

17+
install(
18+
CODE
19+
"message(FATAL_ERROR
20+
\"librustls installation via CMake is not supported. Use 'cargo capi install' instead.\n\"
21+
\"See: https://github.com/rustls/rustls-ffi?tab=readme-ov-file#build-rustls-ffi\")"
22+
)
23+
1724
# Use `cmake -LH $BUILD_DIR` to see all options/help.
1825
# Use `cmake --build $BUILD_DIR --target help` to see all targets.
1926

0 commit comments

Comments
 (0)