forked from github/server
begin using autoconf features in cmake
This commit is contained in:
parent
8e289968d0
commit
0317a2b61d
|
@ -3,6 +3,17 @@ project (arda-server C)
|
|||
|
||||
enable_testing()
|
||||
|
||||
INCLUDE (CheckIncludeFiles)
|
||||
INCLUDE (CheckSymbolExists)
|
||||
CHECK_INCLUDE_FILES (stdbool.h HAVE_STDBOOL_H)
|
||||
CHECK_SYMBOL_EXISTS (_Bool "stdbool.h" HAVE__BOOL)
|
||||
CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H)
|
||||
|
||||
CONFIGURE_FILE (
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
||||
${CMAKE_BINARY_DIR}/include/config.h)
|
||||
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
find_package (Lua 5 REQUIRED)
|
||||
find_package (ToLua REQUIRED)
|
||||
find_package (LibXml2 REQUIRED)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#cmakedefine HAVE_STDBOOL_H 1
|
||||
#cmakedefine HAVE__BOOL 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
|
@ -3,7 +3,7 @@ project (eressea C)
|
|||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
set (ERESSEA_LIBRARY ${PROJECT_NAME} CACHE INTERNAL "Eressea Core Library")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <config.h>
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue