DirectWrite support #28
3 changed files with 39 additions and 39 deletions
commit
bf03674b5d
|
|
@ -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")
|
||||
|
|
@ -47,6 +51,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|||
message(WARNING "DirectWrite support has been disabled (must be compiling on Win10+)")
|
||||
option(MW_USE_DIRECTWRITE "Use DirectWrite" OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux OR ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ file(
|
|||
)
|
||||
find_package(Vulkan)
|
||||
|
||||
foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
|
||||
if(${Vulkan_FOUND})
|
||||
foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
|
||||
get_filename_component(TARGET ${PATH} NAME_WE)
|
||||
add_executable(${TARGET} MACOSX_BUNDLE ${PATH})
|
||||
target_include_directories(
|
||||
|
|
@ -25,4 +26,5 @@ foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
|
|||
m
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue