This commit is contained in:
parent
570f05540e
commit
6259f57677
1 changed files with 14 additions and 10 deletions
|
|
@ -62,11 +62,6 @@ if(MW_TRY_OPENGL)
|
||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
if(OpenGL_FOUND)
|
if(OpenGL_FOUND)
|
||||||
set(MW_BUILD_OPENGL ON)
|
set(MW_BUILD_OPENGL ON)
|
||||||
target_compile_definitions(
|
|
||||||
Mw
|
|
||||||
PRIVATE
|
|
||||||
MW_OPENGL
|
|
||||||
)
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/widget/opengl_cocoa.m")
|
list(APPEND SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/widget/opengl_cocoa.m")
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -80,11 +75,6 @@ if(MW_TRY_VULKAN)
|
||||||
check_include_files(vulkan/vulkan.h HAVE_VULKAN_VULKAN_H)
|
check_include_files(vulkan/vulkan.h HAVE_VULKAN_VULKAN_H)
|
||||||
if(HAVE_VULKAN_VULKAN_H)
|
if(HAVE_VULKAN_VULKAN_H)
|
||||||
set(MW_BUILD_VULKAN ON)
|
set(MW_BUILD_VULKAN ON)
|
||||||
target_compile_definitions(
|
|
||||||
Mw
|
|
||||||
PRIVATE
|
|
||||||
MW_VULKAN
|
|
||||||
)
|
|
||||||
message(STATUS "Vulkan widget has been enabled")
|
message(STATUS "Vulkan widget has been enabled")
|
||||||
else()
|
else()
|
||||||
message(WARNING "Vulkan widget has been disabled")
|
message(WARNING "Vulkan widget has been disabled")
|
||||||
|
|
@ -363,6 +353,14 @@ target_link_libraries(
|
||||||
${LIBRARIES}
|
${LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MW_BUILD_OPENGL)
|
||||||
|
target_compile_definitions(
|
||||||
|
Mw
|
||||||
|
PRIVATE
|
||||||
|
MW_OPENGL
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MW_BUILD_VULKAN)
|
if(MW_BUILD_VULKAN)
|
||||||
check_include_files(vulkan/vk_enum_string_helper.h HAS_VK_ENUM_STRING_HELPER)
|
check_include_files(vulkan/vk_enum_string_helper.h HAS_VK_ENUM_STRING_HELPER)
|
||||||
if(HAS_VK_ENUM_STRING_HELPER)
|
if(HAS_VK_ENUM_STRING_HELPER)
|
||||||
|
|
@ -372,6 +370,12 @@ if(MW_BUILD_VULKAN)
|
||||||
HAS_VK_ENUM_STRING_HELPER
|
HAS_VK_ENUM_STRING_HELPER
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(
|
||||||
|
Mw
|
||||||
|
PRIVATE
|
||||||
|
MW_VULKAN
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(
|
target_compile_definitions(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue