forked from github/server
fix cmake syntax.
This commit is contained in:
parent
65dee13592
commit
102a0e0e27
|
@ -6,41 +6,38 @@ FILE(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH )
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
project (eressea-server C)
|
project (eressea-server C)
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
|
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
include(MSVC)
|
find_package (PDCurses)
|
||||||
|
set (CURSES_FOUND ${PDCURSES_FOUND})
|
||||||
|
set (CURSES_LIBRARIES ${PDCURSES_LIBRARY})
|
||||||
|
set (CURSES_INCLUDE_DIR ${PDCURSES_INCLUDE_DIR})
|
||||||
set (HAVE_STRDUP 0)
|
set (HAVE_STRDUP 0)
|
||||||
set (HAVE_STRLCAT 0)
|
set (HAVE_STRLCAT 0)
|
||||||
set (HAVE_LIBBSD 0)
|
set (HAVE_LIBBSD 0)
|
||||||
set (HAVE_SIGNAL_H 0)
|
set (HAVE_SIGNAL_H 0)
|
||||||
set (HAVE_EXECINFO_H 0)
|
set (HAVE_EXECINFO_H 0)
|
||||||
|
include (MSVC)
|
||||||
else (MSVC)
|
else (MSVC)
|
||||||
|
|
||||||
INCLUDE (CheckIncludeFile)
|
find_package (Curses)
|
||||||
|
include (CheckIncludeFile)
|
||||||
CHECK_INCLUDE_FILE(signal.h HAVE_SIGNAL_H)
|
CHECK_INCLUDE_FILE(signal.h HAVE_SIGNAL_H)
|
||||||
CHECK_INCLUDE_FILE(execinfo.h HAVE_EXECINFO_H)
|
CHECK_INCLUDE_FILE(execinfo.h HAVE_EXECINFO_H)
|
||||||
CHECK_INCLUDE_FILE(bsd/string.h HAVE_LIBBSD)
|
CHECK_INCLUDE_FILE(bsd/string.h HAVE_LIBBSD)
|
||||||
|
|
||||||
INCLUDE (CheckFunctionExists)
|
include (CheckFunctionExists)
|
||||||
CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)
|
CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)
|
||||||
IF (HAVE_LIBBSD)
|
if (HAVE_LIBBSD)
|
||||||
INCLUDE (CheckLibraryExists)
|
include (CheckLibraryExists)
|
||||||
CHECK_LIBRARY_EXISTS(bsd strlcat "bsd/string.h" HAVE_STRLCAT)
|
CHECK_LIBRARY_EXISTS(bsd strlcat "bsd/string.h" HAVE_STRLCAT)
|
||||||
ELSE (HAVE_LIBBSD)
|
else (HAVE_LIBBSD)
|
||||||
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
||||||
ENDIF(HAVE_LIBBSD)
|
endif (HAVE_LIBBSD)
|
||||||
|
|
||||||
find_package (PDCurses)
|
|
||||||
SET(CURSES_FOUND ${PDCURSES_FOUND})
|
|
||||||
SET(CURSES_LIBRARIES ${PDCURSES_LIBRARY})
|
|
||||||
SET(CURSES_INCLUDE_DIR ${PDCURSES_INCLUDE_DIR})
|
|
||||||
else (MSVC)
|
|
||||||
find_package (Curses)
|
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
|
|
||||||
# find_package (Readline)
|
find_package (Readline)
|
||||||
find_package (EXPAT REQUIRED)
|
|
||||||
|
|
||||||
if (ERESSEA_DB STREQUAL "db")
|
if (ERESSEA_DB STREQUAL "db")
|
||||||
find_package (BerkeleyDB REQUIRED QUIET)
|
find_package (BerkeleyDB REQUIRED QUIET)
|
||||||
|
@ -48,6 +45,7 @@ else()
|
||||||
find_package (SQLite3 REQUIRED QUIET)
|
find_package (SQLite3 REQUIRED QUIET)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(EXPAT REQUIRED)
|
||||||
find_package (ToLua REQUIRED)
|
find_package (ToLua REQUIRED)
|
||||||
if (TOLUA_FOUND)
|
if (TOLUA_FOUND)
|
||||||
if (${TOLUA_VERSION_STRING} VERSION_EQUAL "5.2")
|
if (${TOLUA_VERSION_STRING} VERSION_EQUAL "5.2")
|
||||||
|
|
Loading…
Reference in New Issue