Check for existence of stdbool.h during CMake builds
The headerfile is searched for during autogen/autoconf builds to determine when to include stdbool.h. This let CMake builds have the same behavior.
This commit is contained in:
parent
d2fcf2f2d4
commit
0072b618b6
2 changed files with 3 additions and 0 deletions
|
@ -8,8 +8,10 @@ find_package(Check)
|
|||
find_package(PCRE REQUIRED)
|
||||
|
||||
include(CheckSymbolExists)
|
||||
include(CheckIncludeFile)
|
||||
check_symbol_exists(strdup string.h HAVE_STRDUP)
|
||||
check_symbol_exists(strndup string.h HAVE_STRNDUP)
|
||||
check_include_file(stdbool.h HAVE_STDBOOL_H)
|
||||
configure_file(config.h.cmake config.h)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#cmakedefine HAVE_STRDUP @HAVE_STRDUP@
|
||||
#cmakedefine HAVE_STRNDUP @HAVE_STRNDUP@
|
||||
#cmakedefine HAVE_STDBOOL_H @HAVE_STDBOOL_H@
|
||||
|
|
Loading…
Reference in a new issue