forked from github/server
help cmake find pdcurses on windows.
This commit is contained in:
parent
1575a59921
commit
455a929d9e
|
@ -29,10 +29,18 @@ ENDIF(HAVE_LIBBSD)
|
||||||
|
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
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)
|
||||||
|
|
||||||
find_package (SQLite3)
|
find_package (SQLite3)
|
||||||
find_package (BerkeleyDB)
|
find_package (BerkeleyDB)
|
||||||
find_package (Curses)
|
find_package (LibXml2 REQUIRED)
|
||||||
find_package (LibXml2)
|
|
||||||
find_package (ToLua REQUIRED)
|
find_package (ToLua REQUIRED)
|
||||||
if (TOLUA_FOUND)
|
if (TOLUA_FOUND)
|
||||||
if (${TOLUA_VERSION_STRING} VERSION_GREATER "5.2")
|
if (${TOLUA_VERSION_STRING} VERSION_GREATER "5.2")
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
# Locate PDCurses library
|
||||||
|
# This module defines
|
||||||
|
# PDCURSES_LIBRARIES, the name of the library to link against
|
||||||
|
# PDCURSES_FOUND, if false, do not try to link to PDCurses
|
||||||
|
# PDCURSES_INCLUDE_DIR, where to find curses.h
|
||||||
|
|
||||||
|
FIND_PATH(PDCURSES_INCLUDE_DIR curses.h
|
||||||
|
HINTS
|
||||||
|
$ENV{PDCURSESDIR}
|
||||||
|
PATH_SUFFIXES include/pdcurses include)
|
||||||
|
|
||||||
|
FIND_LIBRARY(PDCURSES_LIBRARY
|
||||||
|
NAMES pdcurses
|
||||||
|
HINTS
|
||||||
|
$ENV{PDCURSESDIR}
|
||||||
|
PATH_SUFFIXES lib64 lib)
|
||||||
|
|
||||||
|
FIND_LIBRARY(PDCURSES_PANEL_LIBRARY
|
||||||
|
NAMES panel
|
||||||
|
HINTS
|
||||||
|
$ENV{PDCURSESDIR}
|
||||||
|
PATH_SUFFIXES lib64 lib)
|
||||||
|
|
||||||
|
IF(PDCURSES_LIBRARY)
|
||||||
|
SET(PDCURSES_LIBRARIES ${PDCURSES_LIBRARY})
|
||||||
|
IF(PDCURSES_PANEL_LIBRARY)
|
||||||
|
SET(PDCURSES_LIBRARIES ${PDCURSES_LIBRARIES} ${PDCURSES_PANEL_LIBRARY})
|
||||||
|
ENDIF(PDCURSES_PANEL_LIBRARY)
|
||||||
|
ENDIF(PDCURSES_LIBRARY)
|
||||||
|
|
||||||
|
SET(PDCURSES_FOUND "NO")
|
||||||
|
IF(PDCURSES_INCLUDE_DIR AND PDCURSES_LIBRARY)
|
||||||
|
# message(STATUS "Found PDCurses library: ${PDCURSES_LIBRARIES}")
|
||||||
|
# Set the final string here so the GUI reflects the final state.
|
||||||
|
SET(PDCURSES_LIBRARIES PDCURSES_LIBRARY} CACHE STRING "Where the PDCurses Library can be found")
|
||||||
|
|
||||||
|
SET(PDCURSES_FOUND "YES")
|
||||||
|
ENDIF(PDCURSES_INCLUDE_DIR AND PDCURSES_LIBRARY)
|
|
@ -9,5 +9,5 @@ IF exist build-vs%VSVERSION% goto HAVEDIR
|
||||||
mkdir build-vs%VSVERSION%
|
mkdir build-vs%VSVERSION%
|
||||||
:HAVEDIR
|
:HAVEDIR
|
||||||
cd build-vs%VSVERSION%
|
cd build-vs%VSVERSION%
|
||||||
"%ProgramFiles%\CMake\bin\cmake.exe" -G "Visual Studio %VSVERSION%" -DCMAKE_PREFIX_PATH="%ProgramFiles(x86)%/Lua/5.1;%ERESSEA%/dependencies-win32" -DCMAKE_MODULE_PATH="%SRCDIR%/cmake/Modules" -DCMAKE_SUPPRESS_REGENERATION=TRUE ..
|
"%ProgramFiles%\CMake\bin\cmake.exe" -G "Visual Studio %VSVERSION%" -DCMAKE_PREFIX_PATH="%ProgramFiles(x86)%\Lua\5.1;%ERESSEA%\dependencies-win32" -DCMAKE_SUPPRESS_REGENERATION=TRUE ..
|
||||||
PAUSE
|
PAUSE
|
||||||
|
|
Loading…
Reference in New Issue