blob: 17840437ee190758e3eb94bdfa64356013390ab8 [file] [log] [blame]
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/symlink.gni")
import("//testing/test.gni")
assert(is_win)
# Don't target the tool to non-win host for cross build because the tool depends
# on Win32 API.
# TODO(thakis): Enable this in cross builds, https://crbug.com/799827
if (current_toolchain == host_toolchain || host_os != "win") {
executable("alternate_version_generator") {
testonly = true
sources = [
"alternate_version_generator_main.cc",
]
deps = [
":alternate_version_generator_lib",
"//base",
"//base/test:test_support",
"//build/win:default_exe_manifest",
"//chrome/common:constants",
"//chrome/installer/util:with_rc_strings",
"//testing/gtest",
]
}
} else {
binary_symlink("alternate_version_generator") {
testonly = true
binary_label = ":$target_name($host_toolchain)"
binary_output_name = "alternate_version_generator.exe"
}
}
static_library("alternate_version_generator_lib") {
testonly = true
sources = [
"alternate_version_generator.cc",
"alternate_version_generator.h",
"pe_image_resources.cc",
"pe_image_resources.h",
"resource_loader.cc",
"resource_loader.h",
"resource_updater.cc",
"resource_updater.h",
]
deps = [
"//base",
"//base:base_static",
"//chrome/common:constants",
"//chrome/installer/util:with_rc_strings",
]
}
test("upgrade_test") {
sources = [
"run_all_tests.cc",
"upgrade_test.cc",
]
deps = [
":alternate_version_generator_lib",
"//base",
"//base/test:test_support",
"//chrome/common:constants",
"//chrome/installer/util:with_rc_strings",
"//testing/gtest",
]
data_deps = [
"//chrome/installer/mini_installer",
]
}