cmake: check essential headers even when building with SDL_LIBC=OFF
parent
9d7e4a7d6e
commit
5151cbf4d1
|
@ -1156,11 +1156,18 @@ if(SDL_LIBC)
|
||||||
check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
|
check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(WINDOWS)
|
set(headers
|
||||||
set(HAVE_STDARG_H 1)
|
stdarg.h
|
||||||
set(HAVE_STDDEF_H 1)
|
stddef.h
|
||||||
check_include_file(stdint.h HAVE_STDINT_H)
|
stdint.h
|
||||||
endif()
|
)
|
||||||
|
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()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue