Specify -Iinclude with the crypto target.
It's unclear to me whether doing it target-by-target is an improvement
in crypto/fipsmodule, but this otherwise does seem a bit tidier. This
aligns with CMake's documentation and "modern CMake" which prefers this
pattern.
Change-Id: I36c81842bff8b36eeaaf5dd3e0695fb45f3376c9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/56585
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/rust/CMakeLists.txt b/rust/CMakeLists.txt
index 9bdec3e..344d80f 100644
--- a/rust/CMakeLists.txt
+++ b/rust/CMakeLists.txt
@@ -1,12 +1,8 @@
-# additional interop for things like macros and inlined functions
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
-add_library(
- rust_wrapper
- STATIC
- rust_wrapper.c
-)
+# Additional interop for things like macros and inlined functions.
+add_library(rust_wrapper STATIC rust_wrapper.c)
+target_link_libraries(rust_wrapper crypto)
-# generate architecture specific wrappers
+# Generate architecture-specific wrappers.
set(WRAPPER_TARGET ${CMAKE_BINARY_DIR}/rust/src/wrapper_${RUST_BINDINGS}.rs)
set(COMMAND ${BINDGEN_EXECUTABLE} "wrapper.h"
-o ${WRAPPER_TARGET}