cmake: test -Wl,--version-script with minimal version script

Android ndk 26 errors when a symbol in the version script is not defined.
This commit is contained in:
Anonymous Maarten
2023-09-20 04:24:08 +02:00
committed by Anonymous Maarten
parent 0efa196989
commit 3a36433a3c
2 changed files with 12 additions and 3 deletions

View File

@@ -423,7 +423,7 @@ if(WINDOWS_STORE)
sdl_compile_options(PRIVATE "-ZW")
endif()
check_linker_flag(C "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym" HAVE_WL_VERSION_SCRIPT)
check_linker_supports_version_file(HAVE_WL_VERSION_SCRIPT)
if(HAVE_WL_VERSION_SCRIPT)
sdl_shared_link_options("-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/dynapi/SDL_dynapi.sym")
else()