I am moving my library dependency folder to c:\libraries

build.bat needed to know that.
This commit is contained in:
Enno Rehling 2019-04-06 11:29:19 +02:00
parent c92f7505e5
commit de5181f3fe
3 changed files with 12 additions and 10 deletions

View File

@ -31,9 +31,6 @@ ELSE (HAVE_LIBBSD)
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT) CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
ENDIF(HAVE_LIBBSD) ENDIF(HAVE_LIBBSD)
endif (MSVC)
if (MSVC)
find_package (PDCurses) find_package (PDCurses)
SET(CURSES_FOUND ${PDCURSES_FOUND}) SET(CURSES_FOUND ${PDCURSES_FOUND})
SET(CURSES_LIBRARIES ${PDCURSES_LIBRARY}) SET(CURSES_LIBRARIES ${PDCURSES_LIBRARY})
@ -42,7 +39,8 @@ else (MSVC)
find_package (Curses) 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)
@ -50,7 +48,6 @@ 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")

View File

@ -58,7 +58,9 @@ elseif(TOLUA_INCLUDE_DIR AND EXISTS "${TOLUA_INCLUDE_DIR}/tolua.h")
string(REGEX REPLACE "^#define[\t ]+TOLUA_VERSION[\t ]+\"tolua ([^\"]*)\".*" "\\1" string(REGEX REPLACE "^#define[\t ]+TOLUA_VERSION[\t ]+\"tolua ([^\"]*)\".*" "\\1"
TOLUA_VERSION_STRING "${tolua_version_str}") TOLUA_VERSION_STRING "${tolua_version_str}")
unset(tolua_version_str) unset(tolua_version_str)
endif() else(PC_TOLUA_VERSION)
message(ERROR "TOLUA_VERSION_STRING cannot be determined")
endif(PC_TOLUA_VERSION)
# handle the QUIETLY and REQUIRED arguments and set TOLUA_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set TOLUA_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE

View File

@ -1,13 +1,16 @@
@ECHO OFF @ECHO OFF
IF "%WIN32_DEV%" == "" SET WIN32_DEV="C:\Libraries"
SET CMAKE_ROOT=%ProgramFiles%\CMake
IF "%LUA_DEV%" == "" SET LUA_DEV="%ProgramFiles(x86)%/Lua/5.1"
SET VSVERSION=15 SET VSVERSION=15
SET SRCDIR=%CD% SET SRCDIR=%CD%
CD .. REM CD ..
SET ERESSEA=%CD% REM SET ERESSEA=%CD%
REM CD %SRCDIR%
CD %SRCDIR%
IF exist build-vs%VSVERSION% goto HAVEDIR 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 .. "%CMAKE_ROOT%\bin\cmake.exe" -G "Visual Studio %VSVERSION%" -DCMAKE_PREFIX_PATH="%LUA_DEV%;%WIN32_DEV%" -DCMAKE_MODULE_PATH="%SRCDIR%/cmake/Modules" -DCMAKE_SUPPRESS_REGENERATION=TRUE ..
PAUSE PAUSE