diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake index 3af2b11..5fde085 100644 --- a/cmake/PrivateSdlFunctions.cmake +++ b/cmake/PrivateSdlFunctions.cmake @@ -273,7 +273,7 @@ function(check_linker_support_version_script VAR) endfunction() 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() @@ -339,3 +339,17 @@ function(sdl_get_git_revision_hash VARNAME) endif() set("${VARNAME}" "${revision}" PARENT_SCOPE) endfunction() + +function(SDL_install_pdb TARGET DIRECTORY) + get_property(type TARGET ${TARGET} PROPERTY TYPE) + if(type MATCHES "^(SHARED_LIBRARY|EXECUTABLE)$") + install(FILES $ DESTINATION "${DIRECTORY}" OPTIONAL) + elseif(type STREQUAL "STATIC_LIBRARY") + # FIXME: Use $