Debian Codegraph @

windows/const.ps1

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