2021-08-27 12:34:24 +08:00
|
|
|
$BUILD_ARCH = $args[0]
|
2023-01-08 22:04:14 +08:00
|
|
|
$BUILD_DLL = $args[1]
|
2021-08-27 12:34:24 +08:00
|
|
|
|
|
|
|
# CONFIG_ALL_OPTIONS
|
|
|
|
$CONFIG_ALL_OPTIONS=@()
|
|
|
|
|
2023-01-03 14:34:10 +08:00
|
|
|
if ($BUILD_ARCH -eq "x86") {
|
|
|
|
$CONFIG_ALL_OPTIONS += '-A', 'Win32'
|
2021-08-27 12:34:24 +08:00
|
|
|
}
|
|
|
|
|
2023-01-08 22:04:14 +08:00
|
|
|
if ($BUILD_DLL -eq "true") {
|
|
|
|
$CONFIG_ALL_OPTIONS += '-DBUILD_SHARED_LIBS=TRUE'
|
|
|
|
}
|
|
|
|
|
2023-01-03 14:34:10 +08:00
|
|
|
# windows sdk version, require xxx, but 10.0.22621.0 recommanded
|
|
|
|
|
2023-01-08 22:04:14 +08:00
|
|
|
if ($env:WINSDK_VER -eq '') { # empty, cmake will choose same with runner windows OS build version
|
2023-01-03 14:34:10 +08:00
|
|
|
cmake -S . -B build_$BUILD_ARCH $CONFIG_ALL_OPTIONS -Thost=x64 -DAX_ENABLE_EXT_IMGUI=TRUE -DAX_ENABLE_EXT_LIVE2D=TRUE -DAX_ENABLE_EXT_EFFEKSEER=TRUE
|
|
|
|
} else {
|
2023-01-08 22:04:14 +08:00
|
|
|
cmake -S . -B build_$BUILD_ARCH $CONFIG_ALL_OPTIONS -Thost=x64 -DAX_ENABLE_EXT_IMGUI=TRUE -DAX_ENABLE_EXT_LIVE2D=TRUE -DAX_ENABLE_EXT_EFFEKSEER=TRUE "-DCMAKE_SYSTEM_VERSION=$env:WINSDK_VER"
|
2023-01-03 14:34:10 +08:00
|
|
|
}
|
2021-08-27 12:34:24 +08:00
|
|
|
|
2022-05-23 21:55:30 +08:00
|
|
|
cmake --build build_$BUILD_ARCH --config Release --target cpp_tests
|
2022-10-13 21:44:42 +08:00
|
|
|
|
|
|
|
if ( !($env:PULL_REQUEST -eq 'yes') ) {
|
|
|
|
cmake --build build_$BUILD_ARCH --config Release --target lua_tests
|
|
|
|
}
|