diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake index 69884139..d9beb38c 100644 --- a/cmake/PrivateSdlFunctions.cmake +++ b/cmake/PrivateSdlFunctions.cmake @@ -239,7 +239,12 @@ function(target_get_dynamic_library DEST TARGET) endif() set (result "$") endif() - set(${DEST} ${result} PARENT_SCOPE) + # TARGET_SONAME_FILE is not allowed for DLL target platforms. + if(WIN32) + set(result "$") + else() + set(result "$") + endif() endfunction() macro(sdl_check_project_in_subfolder relative_subfolder name vendored_option)