tcpdump icon indicating copy to clipboard operation
tcpdump copied to clipboard

CMake/CRYPTO - set CMAKE_REQUIRED_INCLUDES

Open justsmth opened this issue 2 years ago • 1 comments

When using a custom CRYPTO library, that library's include path should be set to the CMAKE_REQUIRED_INCLUDES prior to check_include_file.

CMAKE_REQUIRED_INCLUDES A ;-list of header search paths to pass to the compiler. These will be the only header search paths used--the contents of the INCLUDE_DIRECTORIES directory property will be ignored.

Testing

  • Setup
cd `mktemp -d`
git clone https://github.com/aws/aws-lc.git
git clone https://github.com/the-tcpdump-group/tcpdump.git
# Then... change branch or apply this PR as a patch to tcpdump
  • Build/Install AWS-LC
mkdir aws-lc-build aws-lc-install
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=./aws-lc-install -B ./aws-lc-build -S ./aws-lc
cmake --build ./aws-lc-build --target install -j 4
mkdir -p tcpdump-build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=`pwd`/aws-lc-install -S ./tcpdump -B ./tcpdump-build
cmake --build ./tcpdump-build --target tcpdump
cmake --build ./tcpdump-build --target check

Several tests may fail until PR #1351 is merged.

justsmth avatar Dec 08 '23 18:12 justsmth

I updated the description to show how to setup the build to use (e.g.) AWS-LC.

justsmth avatar Dec 11 '23 14:12 justsmth