diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake index b30f380a..1f3786c0 100644 --- a/cmake/PrivateSdlFunctions.cmake +++ b/cmake/PrivateSdlFunctions.cmake @@ -276,7 +276,7 @@ macro(sdl_check_linker_flag flag var) endmacro() function(sdl_target_link_options_no_undefined TARGET) - if(NOT MSVC) + if(NOT MSVC AND NOT CMAKE_SYSTEM_NAME MATCHES ".*OpenBSD.*") if(CMAKE_C_COMPILER_ID MATCHES "AppleClang") target_link_options(${TARGET} PRIVATE "-Wl,-undefined,error") else()