aboutsummaryrefslogtreecommitdiff
path: root/src/win/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'src/win/graphics')
-rw-r--r--src/win/graphics/direct/CMakeLists.txt3
-rw-r--r--src/win/graphics/direct/Font.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/win/graphics/direct/CMakeLists.txt b/src/win/graphics/direct/CMakeLists.txt
index ecd72b13..84c2af61 100644
--- a/src/win/graphics/direct/CMakeLists.txt
+++ b/src/win/graphics/direct/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_win_graphics_direct STATIC
+add_library(cru_win_graphics_direct SHARED
Brush.cpp
Font.cpp
Geometry.cpp
@@ -11,3 +11,4 @@ add_library(cru_win_graphics_direct STATIC
)
target_link_libraries(cru_win_graphics_direct PUBLIC D3D11 D2d1 DWrite)
target_link_libraries(cru_win_graphics_direct PUBLIC cru_win_base cru_platform_graphics)
+target_compile_definitions(cru_win_graphics_direct PRIVATE CRU_WIN_GRAPHICS_DIRECT_EXPORT_API)
diff --git a/src/win/graphics/direct/Font.cpp b/src/win/graphics/direct/Font.cpp
index ffc16214..39ba2d8b 100644
--- a/src/win/graphics/direct/Font.cpp
+++ b/src/win/graphics/direct/Font.cpp
@@ -16,7 +16,7 @@ DWriteFont::DWriteFont(DirectGraphicsFactory* factory, String font_family,
if (!::GetUserDefaultLocaleName(buffer.data(),
static_cast<int>(buffer.size())))
throw platform::win::Win32Error(
- ::GetLastError(), "Failed to get locale when create dwrite font.");
+ ::GetLastError(), u"Failed to get locale when create dwrite font.");
ThrowIfFailed(factory->GetDWriteFactory()->CreateTextFormat(
reinterpret_cast<const wchar_t*>(font_family_.c_str()), nullptr,