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