mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 15:23:34 +00:00
cmake: dfix disabling dlopen notes when configuring with -DSDL_DLOPEN_NOTES=OFF
(cherry picked from commit b0a9f40e28)
This commit is contained in:
@@ -1770,6 +1770,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__
|
||||
@@ -1782,10 +1783,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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user