Fix Linux build without vulkan

This commit is contained in:
Jack Andersen 2018-05-05 15:29:18 -10:00
parent 9031ace975
commit 91734b5b24
2 changed files with 14 additions and 9 deletions

View File

@ -38,7 +38,7 @@ if(NOT GEKKO AND NOT CAFE AND NOT WINDOWS_STORE)
list(APPEND PLAT_SRCS
lib/graphicsdev/GL.cpp
lib/graphicsdev/glew.c)
list(APPEND _BOO_SYS_DEFINES -DBOO_HAS_GL=1)
list(APPEND _BOO_SYS_DEFINES -DBOO_HAS_GL=1 -DGLEW_NO_GLU=1)
list(APPEND PLAT_HDRS
include/boo/graphicsdev/GLSLMacros.hpp
@ -198,13 +198,18 @@ else(NOT GEKKO)
list(APPEND _BOO_SYS_LIBS X11 Xi Xrandr GL asound ${DBUS_LIBRARY} pthread)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
find_path(VULKAN_INCLUDE_DIR
NAMES vulkan/vulkan.h)
if(VULKAN_INCLUDE_DIR)
message(STATUS "Enabling Vulkan support")
list(APPEND PLAT_SRCS
lib/inputdev/HIDListenerUdev.cpp
lib/inputdev/HIDDeviceUdev.cpp
lib/graphicsdev/Vulkan.cpp
lib/graphicsdev/VulkanDispatchTable.cpp)
list(APPEND _BOO_SYS_DEFINES -DBOO_HAS_VULKAN=1 -DVK_USE_PLATFORM_XCB_KHR=1)
endif()
list(APPEND PLAT_SRCS
lib/inputdev/HIDListenerUdev.cpp
lib/inputdev/HIDDeviceUdev.cpp)
list(APPEND _BOO_SYS_LIBS xcb X11-xcb dl udev)
else()
list(APPEND PLAT_SRCS

View File

@ -551,7 +551,7 @@ public:
m_bestStyle, m_fontset, m_lastGlxCtx, (void*)m_getVkProc, &m_glContext);
#else
std::shared_ptr<IWindow> newWindow = _WindowXlibNew(title, m_xDisp, nullptr, m_xDefaultScreen, m_xIM,
m_bestStyle, m_fontset, m_lastGlxCtx, nullptr, &m_glCtx);
m_bestStyle, m_fontset, m_lastGlxCtx, nullptr, &m_glContext);
#endif
m_windows[(Window)newWindow->getPlatformHandle()] = newWindow;
return newWindow;