cmake: dfix disabling dlopen notes when configuring with -DSDL_DLOPEN_NOTES=OFF

This commit is contained in:
Anonymous Maarten
2026-02-01 19:24:03 +01:00
parent 104bee68f9
commit b0a9f40e28

View File

@@ -1786,6 +1786,7 @@ elseif(EMSCRIPTEN)
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
set(SDL_DISABLE_DLOPEN_NOTES TRUE)
if(SDL_DLOPEN_NOTES)
set(CHECK_ELF_DLNOTES_SRC [==[
#ifndef __ELF__
@@ -1798,10 +1799,10 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
return argc + dlnote.hdr.a;
}
]==])
set(SDL_DISABLE_DLOPEN_NOTES FALSE)
check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
if(NOT COMPILER_SUPPORTS_ELFNOTES)
set(SDL_DISABLE_DLOPEN_NOTES TRUE)
if(COMPILER_SUPPORTS_ELFNOTES)
set(SDL_DISABLE_DLOPEN_NOTES FALSE)
set(HAVE_DLOPEN_NOTES TRUE)
endif()
endif()