Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD patches #6057

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions filament/backend/src/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#if defined(FILAMENT_DRIVER_SUPPORTS_VULKAN)
#include "vulkan/PlatformVkCocoa.h"
#endif
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
#if defined(FILAMENT_SUPPORTS_WAYLAND)
#if defined (FILAMENT_DRIVER_SUPPORTS_VULKAN)
#include "vulkan/PlatformVkLinuxWayland.h"
Expand Down Expand Up @@ -119,7 +119,7 @@ DefaultPlatform* DefaultPlatform::create(Backend* backend) noexcept {
return new PlatformVkAndroid();
#elif defined(IOS)
return new PlatformVkCocoaTouch();
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
#if defined(FILAMENT_SUPPORTS_WAYLAND)
return new PlatformVkLinuxWayland();
#elif defined(FILAMENT_SUPPORTS_X11)
Expand Down Expand Up @@ -154,7 +154,7 @@ DefaultPlatform* DefaultPlatform::create(Backend* backend) noexcept {
return new PlatformCocoaTouchGL();
#elif defined(__APPLE__)
return new PlatformCocoaGL();
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
#if defined(FILAMENT_SUPPORTS_X11)
return new PlatformGLX();
#elif defined(FILAMENT_SUPPORTS_EGL_ON_LINUX)
Expand Down
2 changes: 1 addition & 1 deletion libs/bluevk/include/vulkan/vk_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define VK_USE_PLATFORM_ANDROID_KHR 1
#elif defined(IOS)
#define VK_USE_PLATFORM_IOS_MVK 1
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
#if defined(FILAMENT_SUPPORTS_XCB)
#define VK_USE_PLATFORM_XCB_KHR 1
#endif
Expand Down
2 changes: 1 addition & 1 deletion libs/bluevk/src/BlueVKLinuxAndroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool loadLibrary() {
path = FILAMENT_VKLIBRARY_PATH;
#elif defined(__ANDROID__)
path = "libvulkan.so";
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
path = "libvulkan.so.1";
#else
#error "This file should only be compiled for Android or Linux"
Expand Down
6 changes: 4 additions & 2 deletions libs/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ if (ANDROID)
list(APPEND SRCS src/android/ThermalManager.cpp)
endif()
if (LINUX OR ANDROID)
list(APPEND SRCS src/linux/Condition.cpp)
list(APPEND SRCS src/linux/Mutex.cpp)
if (NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
list(APPEND SRCS src/linux/Condition.cpp)
list(APPEND SRCS src/linux/Mutex.cpp)
endif()
list(APPEND SRCS src/linux/Path.cpp)
endif()
if (APPLE)
Expand Down
2 changes: 1 addition & 1 deletion third_party/libsdl2/include/SDL_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "SDL_config_android.h"
#elif defined(__PSP__)
#include "SDL_config_psp.h"
#elif defined(__LINUX__)
#elif defined(__LINUX__) || defined(__FreeBSD__)
#if defined(FILAMENT_SUPPORTS_WAYLAND)
#include "SDL_config_linux_wayland.h"
#elif defined(FILAMENT_SUPPORTS_X11)
Expand Down