Merge PR #5502: BUILD(client): overlay_gl: Detect OpenBSD

This commit is contained in:
Robert Adam 2022-02-06 20:45:10 +01:00 committed by GitHub
commit 096008ae00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -60,7 +60,9 @@ option(static "Build static binaries." OFF)
option(symbols "Build binaries in a way that allows easier debugging." OFF)
option(warnings-as-errors "All warnings are treated as errors." ON)
option(overlay "Build overlay." ON)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
option(overlay "Build overlay." ON)
endif()
option(packaging "Build package." OFF)
option(tests "Build tests." ${packaging})
option(plugins "Build plugins." ON)

View File

@ -6,7 +6,9 @@
# Overlay payload for UNIX-like systems.
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
option(overlay-xcompile "Build 32 bit overlay library, necessary for the overlay to work with 32 bit processes." ON)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
option(overlay-xcompile "Build 32 bit overlay library, necessary for the overlay to work with 32 bit processes." ON)
endif()
endif()
add_library(overlay_gl SHARED "overlay.c")
@ -19,6 +21,9 @@ set_target_properties(overlay_gl
)
if(NOT APPLE)
find_pkg(gl REQUIRED)
target_include_directories(overlay_gl PRIVATE ${gl_INCLUDE_DIRS})
target_link_options(overlay_gl BEFORE
PRIVATE
"-Wl,-z,lazy"