Fixes for DWrite header checks
This commit is contained in:
parent
c091d029c2
commit
3a722c5354
|
@ -80,6 +80,7 @@ include (FindPythonInterp)
|
|||
## Functions and headers
|
||||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckIncludeFiles)
|
||||
macro (check_funcs) # Similar to AC_CHECK_FUNCS of autotools
|
||||
foreach (func_name ${ARGN})
|
||||
string(TOUPPER ${func_name} definition_to_add)
|
||||
|
@ -308,10 +309,14 @@ if (WIN32 AND HB_HAVE_UNISCRIBE)
|
|||
endif ()
|
||||
|
||||
if (WIN32 AND HB_HAVE_DIRECTWRITE)
|
||||
check_include_file_cxx(dwrite_1.h, HAVE_DWRITE_1_H)
|
||||
if (NOT ${HAVE_DWRITE_1_H})
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||
check_include_files("windows.h;dwrite_1.h" HAVE_DWRITE_1_H LANGUAGE CXX)
|
||||
else ()
|
||||
check_include_files("windows.h;dwrite_1.h" HAVE_DWRITE_1_H)
|
||||
endif ()
|
||||
if (NOT HAVE_DWRITE_1_H)
|
||||
message(FATAL_ERROR "DirectWrite was enabled explicitly, but required header is missing")
|
||||
endif()
|
||||
endif ()
|
||||
add_definitions(-DHAVE_DIRECTWRITE)
|
||||
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-directwrite.h)
|
||||
endif ()
|
||||
|
|
|
@ -366,7 +366,7 @@ AC_ARG_WITH(directwrite,
|
|||
have_directwrite=false
|
||||
AC_LANG_PUSH([C++])
|
||||
if test "x$with_directwrite" = "xyes" -o "x$with_directwrite" = "xauto"; then
|
||||
AC_CHECK_HEADERS(dwrite.h, have_directwrite=true)
|
||||
AC_CHECK_HEADERS(dwrite_1.h, have_directwrite=true)
|
||||
fi
|
||||
AC_LANG_POP([C++])
|
||||
if test "x$with_directwrite" = "xyes" -a "x$have_directwrite" != "xtrue"; then
|
||||
|
|
Loading…
Reference in New Issue