CMake: enable Direct2D graphics context by default

Disable it when the d2d1.h header is not found.
When using MSVC, match the behaviour of setup.h.
This commit is contained in:
Maarten Bent
2018-11-04 16:30:20 +01:00
parent 5c4741430a
commit e1e5169e4b
2 changed files with 17 additions and 6 deletions

View File

@@ -208,8 +208,8 @@ if(APPLE)
set(wxUSE_GRAPHICS_CONTEXT ON)
else()
wx_option(wxUSE_GRAPHICS_CONTEXT "use graphics context 2D drawing API")
if (WIN32 AND (NOT MSVC OR MSVC_VERSION LESS 1600))
wx_option(wxUSE_GRAPHICS_DIRECT2D "enable Direct2D graphics context" OFF)
if(WIN32)
wx_option(wxUSE_GRAPHICS_DIRECT2D "enable Direct2D graphics context")
endif()
endif()