DirectWrite support #28

Merged
IoI_xD merged 13 commits from directwrite into master 2026-07-18 11:39:53 +09:00
3 changed files with 39 additions and 39 deletions
Showing only changes of commit bf03674b5d - Show all commits

cross compiling fixes
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit

IoIxD 2026-07-17 17:44:43 -07:00

View file

@ -39,6 +39,10 @@ else()
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
if(${CMAKE_CROSSCOMPILING})
message(STATUS "DirectWrite support has been enabled")
option(MW_USE_DIRECTWRITE "Use DirectWrite" ON)
else()
# DirectWrite stuff can only be used on Win10+
if(${CMAKE_SYSTEM_VERSION} GREATER_EQUAL 10)
message(STATUS "DirectWrite support has been enabled")
@ -48,6 +52,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
option(MW_USE_DIRECTWRITE "Use DirectWrite" OFF)
endif()
endif()
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux OR ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
option(MW_USE_WAYLAND "Enable Wayland backend" ON)
@ -83,8 +88,8 @@ if(MW_TRY_OPENGL)
endif()
if(MW_TRY_VULKAN)
check_include_files(vulkan/vulkan.h HAVE_VULKAN_VULKAN_H)
if(HAVE_VULKAN_VULKAN_H)
find_package(Vulkan OPTIONAL VULKAN)
if(${Vulkan_FOUND})
set(MW_BUILD_VULKAN ON)
message(STATUS "Vulkan widget has been enabled")
else()

View file

@ -5,6 +5,7 @@ file(
)
find_package(Vulkan)
if(${Vulkan_FOUND})
foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
get_filename_component(TARGET ${PATH} NAME_WE)
add_executable(${TARGET} MACOSX_BUNDLE ${PATH})
@ -26,3 +27,4 @@ foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
)
endif()
endforeach()
endif()

View file

@ -1,10 +1,3 @@
/**
* this example is quite minimal, you may need to modify it if your graphics card is more esoteric
*
* ioixd maintains this file. nishi doesn't know vulkan at all
*/
#include <Mw/Milsko.h>
#include <Mw/Widget/Vulkan.h>