aboutsummaryrefslogtreecommitdiff
path: root/tools/win_build.py
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-12 23:00:12 +0800
committercrupest <crupest@outlook.com>2021-04-12 23:00:12 +0800
commit01bbdbe1420c1da4e9bd9595582a9e2d97f32a85 (patch)
tree8dcdebf81cc9185bc148c1cd3572e8066cdb8cb1 /tools/win_build.py
parent4bc40b874d63442faf42fecc789f15db0a80e440 (diff)
downloadcru-01bbdbe1420c1da4e9bd9595582a9e2d97f32a85.tar.gz
cru-01bbdbe1420c1da4e9bd9595582a9e2d97f32a85.tar.bz2
cru-01bbdbe1420c1da4e9bd9595582a9e2d97f32a85.zip
...
Diffstat (limited to 'tools/win_build.py')
-rw-r--r--tools/win_build.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/win_build.py b/tools/win_build.py
index 6cb079b4..c011aafe 100644
--- a/tools/win_build.py
+++ b/tools/win_build.py
@@ -22,11 +22,6 @@ args = parser.parse_args()
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
work_dir = os.path.join(project_root, args.work_dir)
-vcpkg_root = os.path.join(project_root, 'vcpkg')
-
-cmake_toolchain_path = os.path.join(
- vcpkg_root, 'scripts/buildsystems/vcpkg.cmake')
-
# this is not used when generator is Visual Studio
@@ -44,8 +39,8 @@ cmake_toolchain_path = os.path.join(
# os.environ[k] = v
def install_packages():
- subprocess.check_call('vcpkg\\vcpkg.exe install gtest:{arch}-windows fmt:{arch}-windows ms-gsl:{arch}-windows'.format(arch=args.arch),
- stdout=sys.stdout, stderr=sys.stderr)
+ subprocess.check_call(
+ 'vcpkg install', stdout=sys.stdout, stderr=sys.stderr)
def configure():
@@ -55,13 +50,14 @@ def configure():
}
# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- subprocess.check_call('cmake -S . -B {build_dir} -G "Visual Studio 16 2019" -A {arch} -T host=x64 -DCMAKE_TOOLCHAIN_FILE={toolchain}'
- .format(build_dir=work_dir, arch=generater_vs_arch_map[args.arch], toolchain=cmake_toolchain_path),
+ subprocess.check_call('cmake -S . -B {build_dir} -G "Visual Studio 16 2019" -A {arch} -T host=x64'
+ .format(build_dir=work_dir, arch=generater_vs_arch_map[args.arch]),
stdout=sys.stdout, stderr=sys.stderr)
def build():
- subprocess.check_call('cmake --build {build_dir} --target ALL_BUILD --config {config}'.format(build_dir=work_dir, config=args.config),
+ subprocess.check_call('cmake --build {build_dir} --target ALL_BUILD --config {config}'
+ .format(build_dir=work_dir, config=args.config),
stdout=sys.stdout, stderr=sys.stderr)