mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Conditionalise a couple of CMake checks.
On Windows, configure-style checks are a bit slow, so it's worth avoiding unnecessary ones if possible. I was testing for three different header file names that are alternatives to each other, so it makes sense to stop as soon as we find a usable one.
This commit is contained in:
parent
3d55a2befb
commit
c314f58254
@ -25,8 +25,15 @@ include(CheckCSourceCompiles)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
|
||||
|
||||
check_include_files("windows.h;winresrc.h" HAVE_WINRESRC_H)
|
||||
check_include_files("windows.h;winres.h" HAVE_WINRES_H)
|
||||
check_include_files("windows.h;win.h" HAVE_WIN_H)
|
||||
if(NOT HAVE_WINRESRC_H)
|
||||
# A couple of fallback names for the header file you can include in
|
||||
# .rc files. We conditionalise even these checks, to save effort at
|
||||
# cmake time.
|
||||
check_include_files("windows.h;winres.h" HAVE_WINRES_H)
|
||||
if(NOT HAVE_WINRES_H)
|
||||
check_include_files("windows.h;win.h" HAVE_WIN_H)
|
||||
endif()
|
||||
endif()
|
||||
check_include_files("stdint.h" HAVE_STDINT_H)
|
||||
define_negation(HAVE_NO_STDINT_H HAVE_STDINT_H)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user