mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-01 09:34:33 +00:00
cmake: check essential headers even when building with SDL_LIBC=OFF
This commit is contained in:
committed by
Anonymous Maarten
parent
9d7e4a7d6e
commit
5151cbf4d1
@@ -1156,11 +1156,18 @@ if(SDL_LIBC)
|
||||
check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
|
||||
endif()
|
||||
else()
|
||||
if(WINDOWS)
|
||||
set(HAVE_STDARG_H 1)
|
||||
set(HAVE_STDDEF_H 1)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
endif()
|
||||
set(headers
|
||||
stdarg.h
|
||||
stddef.h
|
||||
stdint.h
|
||||
)
|
||||
foreach(_HEADER ${headers})
|
||||
string(TOUPPER "${_HEADER}" HEADER_IDENTIFIER)
|
||||
string(REGEX REPLACE "[./]" "_" HEADER_IDENTIFIER "${HEADER_IDENTIFIER}")
|
||||
set(LIBC_HAS_VAR "LIBC_HAS_${HEADER_IDENTIFIER}")
|
||||
check_include_file("${_HEADER}" "${LIBC_HAS_VAR}")
|
||||
set(HAVE_${HEADER_IDENTIFIER} ${${LIBC_HAS_VAR}})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user