Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile pcap in compile step #141

Merged
merged 3 commits into from
Jun 7, 2022
Merged

Compile pcap in compile step #141

merged 3 commits into from
Jun 7, 2022

Commits on May 24, 2022

  1. build(openwrt): use single toolchain location

    Previously, the toolchain was being built in the CMAKE_BINARY_DIR.
    However, libpcap uses the command, `check_include_file()`, which
    creates a new CMake project in a temporary folder to test C/C++ features.
    
    This causes the OpenWRT SDK to be constantly downloaded multiple times,
    taking a lot of time.
    
    Instead, I've changed the OpenWRT toolchain file to download and extract
    the SDK next to the toolchain file. This should let the SDK be cached.
    aloisklink committed May 24, 2022
    Configuration menu
    Copy the full SHA
    49e3000 View commit details
    Browse the repository at this point in the history
  2. build: remove ${LIBPCAP_INCLUDE_PATH} in cmake

    Manually setting LIBPCAP_INCLUDE_PATH is not needed,
    as target_link_libraries(... PCAP::pcap) will automatically
    include it when needed.
    aloisklink committed May 24, 2022
    Configuration menu
    Copy the full SHA
    6e6cefd View commit details
    Browse the repository at this point in the history
  3. build(pcap): compile libpcap at compile time

    We use `FetchContent_MakeAvailable(libpcap)` to compile
    libpcap at compile time.
    
    Additionally, we only compile `pcap_static`, and nothing else.
    Since this is a static library, we also don't need to include
    it in `cmake --install`.
    aloisklink committed May 24, 2022
    Configuration menu
    Copy the full SHA
    a1a806b View commit details
    Browse the repository at this point in the history