|
|
@ -34,10 +34,12 @@ package("pcapplusplus") |
|
|
|
on_install("windows", "mingw", "linux", "macosx", "android", "bsd", function (package) |
|
|
|
on_install("windows", "mingw", "linux", "macosx", "android", "bsd", function (package) |
|
|
|
local configs = { |
|
|
|
local configs = { |
|
|
|
"-DPCAPPP_BUILD_EXAMPLES=OFF", |
|
|
|
"-DPCAPPP_BUILD_EXAMPLES=OFF", |
|
|
|
"-DPCAPPP_BUILD_TESTS=OFF", |
|
|
|
"-DPCAPPP_BUILD_TESTS=OFF" |
|
|
|
"--compile-no-warning-as-error", |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
|
|
|
|
|
|
|
for _, cmakefile in ipairs(os.files("**/CMakeLists.txt")) do |
|
|
|
|
|
|
|
io.replace(cmakefile, "COMPILE_WARNING_AS_ERROR ON", "COMPILE_WARNING_AS_ERROR OFF") |
|
|
|
|
|
|
|
end |
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
@ -54,7 +56,7 @@ package("pcapplusplus") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void testPcapLiveDeviceList() { |
|
|
|
void testPcapLiveDeviceList() { |
|
|
|
std::vector<pcpp::PcapLiveDevice *> devList = |
|
|
|
std::vector<pcpp::PcapLiveDevice *> devList = |
|
|
|
pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList(); |
|
|
|
pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList(); |
|
|
|
} |
|
|
|
} |
|
|
|
]]}, {configs = {languages = "c++17"}})) |
|
|
|
]]}, {configs = {languages = "c++17"}})) |
|
|
|