]> git.ipfire.org Git - thirdparty/openssl.git/blame - demos/http3/gen_nghttp3.pl
Convert demos to primary build system
[thirdparty/openssl.git] / demos / http3 / gen_nghttp3.pl
CommitLineData
2000281d
NH
1#!/usr/bin/env perl
2#
3
4use File::Copy;
5use File::Path;
6use Fcntl ':flock';
7use strict;
8use warnings;
9
10#open STDOUT, '>&STDERR';
11
12chdir "demos/http3";
13open(my $fh, '>>', './build.info') or die "Could not open build.info - $!";
14flock($fh, LOCK_EX) or die "Could not lock build.info - $!";
15
16if (-d "./nghttp3") {
17 rmtree("./nghttp3") or die "Cannot remove nghttp3: $!";
18}
19system("git clone https://github.com/ngtcp2/nghttp3.git");
20
21chdir "nghttp3";
22mkdir "build";
23system("git submodule init ./lib/sfparse ./tests/munit");
24system("git submodule update");
25system("cmake -DENABLE_LIB_ONLY=1 -S . -B build");
26system("cmake --build build");
27
28my $libs="./build/lib/libnghttp*";
29
30for my $file (glob $libs) {
31 copy($file, "..");
32}
33
34chdir "../../..";
35close($fh);
36
37exit(0);