// Copyright (C) 2023 Andrew Rioux // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . fn main() { let dst = cmake::Config::new("libpcap") .define("BUILD_SHARED_LIBS", "OFF") .define("BUILD_WITH_LIBNL", "OFF") .define("DISABLE_BLUETOOTH", "ON") .define("DISABLE_DAG", "ON") .define("DISABLE_DBUS", "ON") .define("DISABLE_DPDK", "ON") .define("DISABLE_LINUX_USBMON", "ON") .define("DISABLE_NETMAP", "ON") .define("DISABLE_RDMA", "ON") .define("DISABLE_SEPTEL", "ON") .define("DISABLE_SNF", "ON") .define("DISABLE_TC", "ON") .define("PCAP_TYPE", "linux") .build(); // panic!("hahahahah test {}", dst.display()); println!("cargo:rustc-link-search=native={}/lib", dst.display()); println!("cargo:rustc-link-lib=pcap"); }