opts("armv7") {
enabled = current_cpu == "arm"
- sources = skia_opts.armv7_sources + skia_opts.neon_sources
+ sources = skia_opts.armv7_sources
+ if (!is_win) {
+ sources += skia_opts.neon_sources
+ }
cflags = []
}
sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
} else if (is_ios) {
sources += [ "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp" ]
- } else if (is_win) {
+ } else if (is_win && !is_winrt) {
sources += [ "src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp" ]
libs += [ "OpenGL32.lib" ]
} else {
sources += [
"src/fonts/SkFontMgr_indirect.cpp",
"src/ports/SkDebug_win.cpp",
- "src/ports/SkFontHost_win.cpp",
"src/ports/SkFontMgr_win_dw.cpp",
"src/ports/SkImageEncoder_WIC.cpp",
"src/ports/SkImageGeneratorWIC.cpp",
"src/ports/SkTLS_win.cpp",
"src/ports/SkTypeface_win_dw.cpp",
]
+ if (!is_winrt) {
+ sources += [ "src/ports/SkFontHost_win.cpp" ]
+ }
if (skia_use_gdi) {
sources += [ "src/ports/SkFontMgr_win_gdi_factory.cpp" ]
libs += [
]
}
+ if (is_winrt) {
+ sources -= [
+ get_path_info("src/utils/win/SkWGL.h", "abspath"),
+ get_path_info("src/utils/win/SkWGL_win.cpp", "abspath"),
+ ]
+ }
+
if (is_android) {
deps += [ "//third_party/expat" ]
if (is_skia_standalone && ndk != "") {
"WIN32_LEAN_AND_MEAN",
"NOMINMAX",
]
- include_dirs = [
- "$windk/VC/include",
-
- # For local builds.
- "$windk/../Windows Kits/10/Include/10.0.10150.0/ucrt",
- "$windk/../Windows Kits/8.1/Include/shared",
- "$windk/../Windows Kits/8.1/Include/um",
- "$windk/../Windows Kits/8.1/Include/winrt",
-
- # For builds using win_toolchain asset.
- "$windk/win_sdk/Include/10.0.14393.0/shared",
- "$windk/win_sdk/Include/10.0.14393.0/ucrt",
- "$windk/win_sdk/Include/10.0.14393.0/um",
- "$windk/win_sdk/Include/10.0.14393.0/winrt",
- ]
- lib_dirs = [
- # For local builds.
- "$windk/../Windows Kits/10/Lib/10.0.10150.0/ucrt/$target_cpu",
- "$windk/../Windows Kits/8.1/Lib/winv6.3/um/$target_cpu",
-
- # For builds using win_toolchain asset.
- "$windk/win_sdk/Lib/10.0.14393.0/ucrt/$target_cpu",
- "$windk/win_sdk/Lib/10.0.14393.0/um/$target_cpu",
- ]
+ if (is_winrt) {
+ include_dirs = [
+ "$windk/VC/include",
+
+ "$windk/../Windows Kits/10/Include/10.0.10240.0/ucrt",
+ "$windk/../Windows Kits/10/Include/10.0.10240.0/um",
+ "$windk/../Windows Kits/10/Include/10.0.10240.0/shared",
+ "$windk/../Windows Kits/10/Include/10.0.10240.0/winrt",
+ ]
+ lib_dirs = [
+ "$windk/../Windows Kits\10\lib\10.0.10240.0\ucrt\$target_cpu",
+ "$windk/../Windows Kits\10\lib\10.0.10240.0\um\$target_cpu",
+ ]
+ } else {
+ include_dirs = [
+ "$windk/VC/include",
+
+ # For local builds.
+ "$windk/../Windows Kits/10/Include/10.0.10150.0/ucrt",
+ "$windk/../Windows Kits/8.1/Include/shared",
+ "$windk/../Windows Kits/8.1/Include/um",
+ "$windk/../Windows Kits/8.1/Include/winrt",
+
+ # For builds using win_toolchain asset.
+ "$windk/win_sdk/Include/10.0.14393.0/shared",
+ "$windk/win_sdk/Include/10.0.14393.0/ucrt",
+ "$windk/win_sdk/Include/10.0.14393.0/um",
+ "$windk/win_sdk/Include/10.0.14393.0/winrt",
+ ]
+ lib_dirs = [
+ # For local builds.
+ "$windk/../Windows Kits/10/Lib/10.0.10150.0/ucrt/$target_cpu",
+ "$windk/../Windows Kits/8.1/Lib/winv6.3/um/$target_cpu",
+
+ # For builds using win_toolchain asset.
+ "$windk/win_sdk/Lib/10.0.14393.0/ucrt/$target_cpu",
+ "$windk/win_sdk/Lib/10.0.14393.0/um/$target_cpu",
+ ]
+ }
if (target_cpu == "x86") {
lib_dirs += [ "$windk/VC/lib" ]
+ } else if (target_cpu == "arm") {
+ lib_dirs += [ "$windk/VC/lib/arm" ]
} else {
lib_dirs += [ "$windk/VC/lib/amd64" ]
}
]
}
- if (current_cpu == "arm") {
+ if (current_cpu == "arm" && !is_win) {
cflags += [
"-march=armv7-a",
"-mfpu=neon",
"-mthumb",
]
- } else if (current_cpu == "mipsel") {
+ } else if (current_cpu == "mipsel" && !is_win) {
cflags += [
"-march=mips32r2",
"-mdspr2",
toolchain("msvc") {
lib_dir_switch = "/LIBPATH:"
- bin = "$windk/VC/bin/amd64"
+ _target = "amd64"
env_setup = ""
- if (target_cpu == "x86") {
- bin += "_x86"
- env_setup = "cmd /c $windk/win_sdk/bin/SetEnv.cmd /x86 && "
+ env_setup_end = ""
+ if (target_cpu != "x64") {
+ if (target_cpu == "x86") {
+ _target += "_x86"
+ } else if (target_cpu == "arm") {
+ _target += "_arm"
+ }
+ env_setup = "cmd /c \"\"$windk/VC/vcvarsall.bat\" $_target && "
+ env_setup_end = "\""
}
+ bin = "$windk/VC/bin/$_target"
tool("cc") {
rspfile = "{{output}}.rsp"
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
# Label names may have spaces so pdbname must be quoted.
- command = "$env_setup$bin/cl.exe /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
+ command = "$env_setup\"$bin/cl.exe\" /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"$env_setup_end"
depsformat = "msvc"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
# Label names may have spaces so pdbname must be quoted.
- command = "$env_setup$bin/cl.exe /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
+ command = "$env_setup\"$bin/cl.exe\" /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\"$env_setup_end"
depsformat = "msvc"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
tool("alink") {
rspfile = "{{output}}.rsp"
- command = "$env_setup$bin/lib.exe /nologo /ignore:4221 {{arflags}} /OUT:{{output}} @$rspfile"
+ command = "$env_setup\"$bin/lib.exe\" /nologo /ignore:4221 {{arflags}} /OUT:{{output}} @$rspfile$env_setup_end"
outputs = [
# Ignore {{output_extension}} and always use .lib, there's no reason to
# allow targets to override this extension on Windows.
pdbname = "${dllname}.pdb"
rspfile = "${dllname}.rsp"
- command = "$env_setup$bin/link.exe /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:$pdbname @$rspfile"
+ command = "$env_setup\"$bin/link.exe\" /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:$pdbname @$rspfile$env_setup_end"
outputs = [
dllname,
libname,
rspfile = "$exename.rsp"
command =
- "$env_setup$bin/link.exe /nologo /OUT:$exename /PDB:$pdbname @$rspfile"
+ "$env_setup\"$bin/link.exe\" /nologo /OUT:$exename /PDB:$pdbname @$rspfile$env_setup_end"
default_output_extension = ".exe"
default_output_dir = "{{root_out_dir}}"