xref: /freebsd/contrib/libfido2/windows/const.ps1 (revision 60a517b66a69b8c011b04063ef63a938738719bd)
12ccfa855SEd Maste # Copyright (c) 2021-2023 Yubico AB. All rights reserved.
2f540a430SEd Maste # Use of this source code is governed by a BSD-style
3f540a430SEd Maste # license that can be found in the LICENSE file.
42ccfa855SEd Maste # SPDX-License-Identifier: BSD-2-Clause
5f540a430SEd Maste 
6f540a430SEd Maste # LibreSSL coordinates.
7f540a430SEd Maste New-Variable -Name 'LIBRESSL_URL' `
8*60a517b6SEd Maste     -Value 'https://cloudflare.cdn.openbsd.org/pub/OpenBSD/LibreSSL' `
9f540a430SEd Maste     -Option Constant
10*60a517b6SEd Maste New-Variable -Name 'LIBRESSL' -Value 'libressl-3.7.3' -Option Constant
112ccfa855SEd Maste New-Variable -Name 'CRYPTO_LIBRARIES' -Value 'crypto-50' -Option Constant
12f540a430SEd Maste 
13f540a430SEd Maste # libcbor coordinates.
14*60a517b6SEd Maste New-Variable -Name 'LIBCBOR' -Value 'libcbor-0.10.2' -Option Constant
15*60a517b6SEd Maste New-Variable -Name 'LIBCBOR_BRANCH' -Value 'v0.10.2' -Option Constant
16f540a430SEd Maste New-Variable -Name 'LIBCBOR_GIT' -Value 'https://github.com/pjk/libcbor' `
17f540a430SEd Maste     -Option Constant
18f540a430SEd Maste 
19f540a430SEd Maste # zlib coordinates.
20*60a517b6SEd Maste New-Variable -Name 'ZLIB' -Value 'zlib-1.3' -Option Constant
21*60a517b6SEd Maste New-Variable -Name 'ZLIB_BRANCH' -Value 'v1.3' -Option Constant
22f540a430SEd Maste New-Variable -Name 'ZLIB_GIT' -Value 'https://github.com/madler/zlib' `
23f540a430SEd Maste     -Option Constant
24f540a430SEd Maste 
25f540a430SEd Maste # Work directories.
26f540a430SEd Maste New-Variable -Name 'BUILD' -Value "$PSScriptRoot\..\build" -Option Constant
27f540a430SEd Maste New-Variable -Name 'OUTPUT' -Value "$PSScriptRoot\..\output" -Option Constant
28f540a430SEd Maste 
29f540a430SEd Maste # Prefixes.
30f540a430SEd Maste New-Variable -Name 'STAGE' -Value "${BUILD}\${Arch}\${Type}" -Option Constant
31f540a430SEd Maste New-Variable -Name 'PREFIX' -Value "${OUTPUT}\${Arch}\${Type}" -Option Constant
32f540a430SEd Maste 
33f540a430SEd Maste # Build flags.
34f540a430SEd Maste if ("${Type}" -eq "dynamic") {
35f540a430SEd Maste 	New-Variable -Name 'RUNTIME' -Value '/MD' -Option Constant
36f540a430SEd Maste 	New-Variable -Name 'SHARED' -Value 'ON' -Option Constant
37*60a517b6SEd Maste 	New-Variable -Name 'CMAKE_MSVC_RUNTIME_LIBRARY' -Option Constant `
38*60a517b6SEd Maste 	    -Value 'MultiThreaded$<$<CONFIG:Debug>:Debug>DLL'
39f540a430SEd Maste } else {
40f540a430SEd Maste 	New-Variable -Name 'RUNTIME' -Value '/MT' -Option Constant
41f540a430SEd Maste 	New-Variable -Name 'SHARED' -Value 'OFF' -Option Constant
42*60a517b6SEd Maste 	New-Variable -Name 'CMAKE_MSVC_RUNTIME_LIBRARY' -Option Constant `
43*60a517b6SEd Maste 	    -Value 'MultiThreaded$<$<CONFIG:Debug>:Debug>'
44f540a430SEd Maste }
45f540a430SEd Maste New-Variable -Name 'CFLAGS_DEBUG' -Value "${RUNTIME}d /Zi /guard:cf /sdl" `
46f540a430SEd Maste     -Option Constant
47f540a430SEd Maste New-Variable -Name 'CFLAGS_RELEASE' -Value "${RUNTIME} /Zi /guard:cf /sdl" `
48f540a430SEd Maste     -Option Constant
49