Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

Commit

Permalink
Use DirectWrite on Windows GNU
Browse files Browse the repository at this point in the history
  • Loading branch information
UK992 committed Nov 24, 2016
1 parent 0a5935b commit 261000c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ if(NOT WIN32)
add_definitions(-fPIC)
endif()

if(MSVC)
set(WINDOWS_USE_DIRECTWRITE TRUE)
endif()

if(NOT APPLE AND NOT WINDOWS_USE_DIRECTWRITE)
if(NOT APPLE AND NOT WIN32)
if(NOT "$ENV{DEP_FREETYPE_OUTDIR}" STREQUAL "")
include_directories($ENV{DEP_FREETYPE_OUTDIR}/include/freetype2)
message(STATUS "Using DEP_FREETYPE_OUTDIR/include/freetype2: " $ENV{DEP_FREETYPE_OUTDIR})
Expand Down Expand Up @@ -608,7 +604,7 @@ if(WIN32)
SkWGL_win.cpp
)

if(WINDOWS_USE_DIRECTWRITE)
if(WIN32)
# If we're building with DirectWrite and DW only
set_prefix(SKIA_PORTS_2_SRC src/ports/
SkFontMgr_default_dw.cpp
Expand All @@ -631,7 +627,7 @@ if(WIN32)
SkFontHost_FreeType_common.cpp
SkFontHost_fontconfig.cpp
)

set_prefix(SKIA_FONTS_SRC src/fonts/
SkFontMgr_fontconfig.cpp
)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ libc = "0.2"
servo-glutin = "0.6"
expat-sys = "2.1.1"

[target.'cfg(any(target_os = "android", target_os = "linux", all(target_os = "windows", target_env = "gnu")))'.dependencies]
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
servo-fontconfig-sys = "4.0.0"
servo-freetype-sys = "4.0.0"

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ extern crate glx;
#[cfg(target_os="android")]
extern crate egl;

#[cfg(any(target_os="linux", target_os="android", all(target_os="windows", target_env="gnu")))]
#[cfg(any(target_os="linux", target_os="android"))]
extern crate freetype_sys;

#[cfg(any(target_os="linux", target_os="android", all(target_os="windows", target_env="gnu")))]
#[cfg(any(target_os="linux", target_os="android"))]
extern crate fontconfig_sys;

pub use skia::{
Expand Down

0 comments on commit 261000c

Please sign in to comment.