on macos, there is apparently no ncursesw

This commit is contained in:
Enno Rehling 2021-03-16 21:29:05 +01:00
parent b48ade8598
commit bd3e26d634
2 changed files with 31 additions and 25 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.19)
if (WIN32)
file(TO_CMAKE_PATH "${CMAKE_MODULE_PATH}" CMAKE_MODULE_PATH )
@ -13,17 +13,41 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
endif (WIN32)
if (MSVC)
find_package (PDCurses)
set (CURSES_FOUND ${PDCURSES_FOUND})
set (CURSES_LIBRARIES ${PDCURSES_LIBRARY})
set (CURSES_INCLUDE_DIRS ${PDCURSES_INCLUDE_DIR})
find_package (PDCurses)
set (CURSES_FOUND ${PDCURSES_FOUND})
set (CURSES_LIBRARIES ${PDCURSES_LIBRARY})
set (CURSES_INCLUDE_DIRS ${PDCURSES_INCLUDE_DIR})
endif(MSVC)
if (NOT CURSES_FOUND)
set(CURSES_NEED_WIDE TRUE)
set(CURSES_NEED_NCURSES TRUE)
find_package (Curses)
if (NOT CURSES_FOUND)
set(CURSES_NEED_WIDE FALSE)
find_package (Curses REQUIRED)
endif(NOT CURSES_FOUND)
endif (NOT CURSES_FOUND)
find_package (ToLua 5.2 REQUIRED)
#find_package (BerkeleyDB REQUIRED)
find_package (SQLite3 REQUIRED)
find_package (IniParser REQUIRED)
find_package (CJSON REQUIRED)
find_package (EXPAT REQUIRED)
find_package (Lua)
if (NOT LUA_FOUND)
find_package (Lua51 REQUIRED)
endif()
if (MSVC)
set (HAVE_STRDUP 0)
set (HAVE_STRLCAT 0)
set (HAVE_LIBBSD 0)
set (HAVE_SIGNAL_H 0)
set (HAVE_EXECINFO_H 0)
else (MSVC)
include (CheckIncludeFile)
check_include_file(signal.h HAVE_SIGNAL_H)
check_include_file(execinfo.h HAVE_EXECINFO_H)
@ -41,24 +65,6 @@ if (HAVE_LIBBSD)
endif (HAVE_LIBBSD)
endif (MSVC)
if (NOT CURSES_FOUND)
set(CURSES_NEED_WIDE TRUE)
set(CURSES_NEED_NCURSES TRUE)
find_package (Curses)
endif (NOT CURSES_FOUND)
find_package (ToLua 5.2 REQUIRED)
#find_package (BerkeleyDB REQUIRED)
find_package (SQLite3 REQUIRED)
find_package (IniParser REQUIRED)
find_package (CJSON REQUIRED)
find_package (EXPAT REQUIRED)
find_package (Lua)
if (NOT LLUA_FOUND)
find_package (Lua51 REQUIRED)
endif()
enable_testing()
add_subdirectory (tools)

View File

@ -27,7 +27,7 @@ ROOT=`pwd`
while [ ! -d $ROOT/.git ]; do
ROOT=`dirname $ROOT`
done
export LUA_PATH="$ROOT/scripts/?.lua;$LUA_PATH"
cd $ROOT/tests
setup
cleanup