diff --git a/CMakeLists.txt b/CMakeLists.txt index cdfa3327f..0d2f5e3ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/overlay_gl/CMakeLists.txt b/overlay_gl/CMakeLists.txt index f75984693..08c19f625 100644 --- a/overlay_gl/CMakeLists.txt +++ b/overlay_gl/CMakeLists.txt @@ -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"