gn win: Add system include directories to midl template
Otherwise, midl.exe will fail to find standard .idls, e.g.: midl : command line error MIDL1001 : cannot open input file objidl.idl R=brettw@chromium.org BUG=354261 Review URL: https://codereview.chromium.org/423263002 git-svn-id: http://src.chromium.org/svn/trunk/src/build@286437 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
788aaecd5e
Коммит
b5e29cbe27
|
@ -20,23 +20,9 @@ config("sdk") {
|
|||
"WINVER=0x0602",
|
||||
]
|
||||
|
||||
# The Windows SDK include directories must be first. They both have a sal.h,
|
||||
# and the SDK one is newer and the SDK uses some newer features from it not
|
||||
# present in the Visual Studio one.
|
||||
include_dirs = [
|
||||
"$windows_sdk_path\Include\shared",
|
||||
"$windows_sdk_path\Include\um",
|
||||
"$windows_sdk_path\Include\winrt",
|
||||
"$visual_studio_path\VC\include",
|
||||
"$visual_studio_path\VC\atlmfc\include",
|
||||
]
|
||||
include_dirs = system_include_dirs
|
||||
|
||||
if (is_visual_studio_express) {
|
||||
include_dirs += [
|
||||
"$wdk_path/inc/atl71",
|
||||
"$wdk_path/inc/mfc42",
|
||||
]
|
||||
|
||||
# https://code.google.com/p/chromium/issues/detail?id=372451#c20
|
||||
# Warning 4702 ("Unreachable code") should be re-enabled once Express users
|
||||
# are updated to VS2013 Update 2.
|
||||
|
|
|
@ -20,6 +20,11 @@ declare_args() {
|
|||
# This value is the default location, override if you have a different
|
||||
# installation location.
|
||||
windows_sdk_path = "C:\Program Files (x86)\Windows Kits\8.0"
|
||||
|
||||
# The list of include directories that are treated as "system" include
|
||||
# directories. TODO(scottmg): These are incorrectly put on the command line
|
||||
# in GN, they should really be stored into %INCLUDE%.
|
||||
system_include_dirs = []
|
||||
}
|
||||
|
||||
if (visual_studio_path == "") {
|
||||
|
@ -38,3 +43,22 @@ if (visual_studio_path == "") {
|
|||
|
||||
# Set when using the "Express" version of a Visual Studio version we support.
|
||||
is_visual_studio_express = (visual_studio_version == "2013e")
|
||||
|
||||
|
||||
# The Windows SDK include directories must be first. They both have a sal.h,
|
||||
# and the SDK one is newer and the SDK uses some newer features from it not
|
||||
# present in the Visual Studio one.
|
||||
system_include_dirs = [
|
||||
"$windows_sdk_path\Include\shared",
|
||||
"$windows_sdk_path\Include\um",
|
||||
"$windows_sdk_path\Include\winrt",
|
||||
"$visual_studio_path\VC\include",
|
||||
"$visual_studio_path\VC\atlmfc\include",
|
||||
]
|
||||
|
||||
if (is_visual_studio_express) {
|
||||
system_include_dirs += [
|
||||
"$wdk_path/inc/atl71",
|
||||
"$wdk_path/inc/mfc42",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
assert(is_win)
|
||||
|
||||
import("//build/config/win/visual_studio_version.gni")
|
||||
|
||||
# This template defines a rule to invoke the MS IDL compiler.
|
||||
#
|
||||
# Parameters
|
||||
|
@ -77,6 +79,10 @@ template("midl") {
|
|||
"/env", idl_target_platform,
|
||||
"/Oicf",
|
||||
]
|
||||
|
||||
foreach(include, system_include_dirs) {
|
||||
args += [ "/I", include ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set(target_name) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче