Skip to content

Commit

Permalink
xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
LDVG committed Sep 1, 2023
1 parent 2705342 commit fc583e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ try {
-DBUILD_SHARED_LIBS="${SHARED}" `
-DCMAKE_C_FLAGS_DEBUG="${CFLAGS_DEBUG}" `
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS_RELEASE}" `
-DCMAKE_MSVC_RUNTIME_LIBRARY="${CMAKE_MSVC_RUNTIME_LIBRARY}"
-DCMAKE_INSTALL_PREFIX="${PREFIX}" "${CMAKE_SYSTEM_VERSION}"; `
ExitOnError
& $CMake --build . --config ${Config} --verbose; ExitOnError
Expand Down
6 changes: 6 additions & 0 deletions windows/const.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ New-Variable -Name 'OUTPUT' -Value "$PSScriptRoot\..\output" -Option Constant
New-Variable -Name 'STAGE' -Value "${BUILD}\${Arch}\${Type}" -Option Constant
New-Variable -Name 'PREFIX' -Value "${OUTPUT}\${Arch}\${Type}" -Option Constant

New-Varible '_RUNTIME_DYNAMIC' -Value '$<$<BOOL:${BUILD_SHARED_LIBS}>:DLL>' -Option Constant
New-Variable '_RUNTIME_CONFIG' -Value '<$<$CONFIG:Debug>:Debug>' -Option Constant
New-Variable 'CMAKE_MSVC_RUNTIME_LIBRARY' -Value "MultiThreaded${_RUNTIME_CONFIG}${_RUNTIME_DYNAMIC}" -Option Constant

# Build flags.
if ("${Type}" -eq "dynamic") {
New-Variable -Name 'RUNTIME' -Value '/MD' -Option Constant
New-Variable -Name 'SHARED' -Value 'ON' -Option Constant
New-Variable -Name 'CMAKE_RUNTIME' -Value 'MultiThreaded<$<$CONFIG:Debug>:Debug>DLL'
} else {
New-Variable -Name 'RUNTIME' -Value '/MT' -Option Constant
New-Variable -Name 'SHARED' -Value 'OFF' -Option Constant
New-Variable -Name 'CMAKE_RUNTIME' -Value 'MultiThreaded<$<$CONFIG:Debug>:Debug>'
}
New-Variable -Name 'CFLAGS_DEBUG' -Value "${RUNTIME}d /Zi /guard:cf /sdl" `
-Option Constant
Expand Down

0 comments on commit fc583e7

Please sign in to comment.