OpenBSD build fixes

- Specify OpenBSD's X11 include directory
- Add OpenBSD-specific linker flag to allow W|X
This commit is contained in:
OpenSauce04 2026-04-19 13:03:40 +01:00 committed by OpenSauce
parent 0fe6a8c7df
commit 5bc58c78ed
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
enable_language(OBJC OBJCXX)
endif()
if (BSD STREQUAL "OpenBSD")
add_link_options(-z wxneeded)
endif()
option(ENABLE_LIBRETRO "Build as a LibRetro core" OFF)
# Some submodules like to pick their own default build type if not specified.

View File

@ -508,6 +508,10 @@ if (ENABLE_VULKAN)
# prefix location. -OS
target_include_directories(vulkan-headers INTERFACE
/usr/pkg/share/x11-links/include)
elseif (BSD STREQUAL "OpenBSD")
# This is fine to hardcode because it'll never change
target_include_directories(vulkan-headers INTERFACE
/usr/X11R6/include)
endif()
endif()