Mention Windows SDK compat in installation docs
[tinc] / .ci / conf.sh
1 #!/bin/sh
2
3 set -eux
4
5 add_flag() {
6   printf ' %s ' "$@"
7 }
8
9 conf_linux() {
10   HOST="${HOST:-nonexistent}"
11   if [ "$HOST" = mingw ]; then
12     cross=".ci/cross/windows/amd64"
13   else
14     cross=".ci/cross/linux/$HOST"
15   fi
16   if [ -f "$cross" ]; then
17     add_flag --cross-file "$cross"
18   fi
19   add_flag -Dminiupnpc=auto -Duml=true
20 }
21
22 conf_windows() {
23   add_flag -Dminiupnpc=auto
24 }
25
26 conf_macos() {
27   openssl=$(brew --prefix openssl)
28   add_flag -Dminiupnpc=auto -Dpkg_config_path="$openssl/lib/pkgconfig"
29 }
30
31 add_flag -Dbuildtype=release "$@"
32
33 case "$(uname -s)" in
34 Linux) conf_linux ;;
35 MINGW*) conf_windows ;;
36 Darwin) conf_macos ;;
37 *) exit 1 ;;
38 esac