Remove a warning and some useless compilations

- Removes lua install from CI
This commit is contained in:
Linus Probert 2018-09-08 23:23:49 +02:00
parent f3ecd50b1a
commit 321dc4f3af
6 changed files with 17 additions and 41 deletions

View File

@ -14,7 +14,6 @@ before_build:
- |-
%DEPENDS% mkdir %PREFIX%\include\SDL2
%DEPENDS% mkdir %PREFIX%\lib
%DEPENDS% mkdir c:\lua
%DEPENDS% cd %TEMP%
# SDL2
@ -66,17 +65,6 @@ before_build:
copy %PREFIX%\lib\SDL2.dll %APPVEYOR_BUILD_FOLDER% > nul
copy %PREFIX%\lib\cmocka.dll %APPVEYOR_BUILD_FOLDER% > nul
# Lua
- |-
- ps: |
If (!(Test-Path -Path "c:\usr\lib\liblua53.a")) {
(New-Object Net.WebClient).DownloadFile("https://sourceforge.net/projects/luabinaries/files/5.3.4/Windows%20Libraries/Static/lua-5.3.4_Win32_mingw4_lib.zip/download", "c:\lua\lua-5.3.4_Win32_mingw4_lib.zip")
}
- |-
%DEPENDS% 7z x "c:\lua\lua-5.3.4_Win32_mingw4_lib.zip" -o"c:\lua" > nul
%DEPENDS% copy c:\lua\include\*.h %PREFIX%\include > nul
%DEPENDS% copy c:\lua\liblua53.a %PREFIX%\lib > nul
build_script:
- |-
set Path=C:\MinGW\bin;%Path%

View File

@ -32,7 +32,6 @@ install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake .. && make -j2 && sudo make install ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ../.. ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y lua5.2 liblua5.2-dev ; fi
script:
- mkdir _build

View File

@ -10,7 +10,6 @@ set(breakhack_MINOR_VERSION 0)
set(breakhack_PATCH_VERSION 6)
set(breakhack_RELEASE_TYPE "")
include(FindPhysFS)
include(build/cmake/FindSDL2.cmake)
include(build/cmake/FindSDL2_image.cmake)
include(build/cmake/FindSDL2_ttf.cmake)
@ -89,20 +88,6 @@ IF ( GCC OR CLANG )
)
ENDIF ( GCC OR CLANG )
if (NOT PHYSFS_FOUND OR WIN32)
set(PHYSFS_BUILD_STATIC TRUE)
set(PHYSFS_BUILD_SHARED FALSE)
set(PHYSFS_BUILD_TEST FALSE)
add_subdirectory(physfs-3.0.1)
include_directories(
physfs-3.0.1/src
)
else ()
include_directories(
${PHYSFS_INCLUDE_DIR}
)
endif ()
if (STEAM)
include_directories(
${STEAMWORKS_INCLUDE_DIR}
@ -111,7 +96,11 @@ if (STEAM)
endif ()
add_subdirectory(lua-5.3.5)
include_directories(lua-5.3.5/src)
add_subdirectory(physfs-3.0.1)
include_directories(
lua-5.3.5/src
physfs-3.0.1/src
)
include_directories(
${PROJECT_BINARY_DIR}
@ -234,15 +223,9 @@ if (STEAM)
)
endif ()
if (NOT PHYSFS_FOUND)
target_link_libraries(breakhack
physfs-static
)
else ()
target_link_libraries(breakhack
${PHYSFS_LIBRARY}
)
endif ()
target_link_libraries(breakhack
physfs-static
)
if (MSVC)
set_target_properties(breakhack PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")

View File

@ -8,6 +8,10 @@ set(lua_MAJOR_VERSION 5)
set(lua_MINOR_VERSION 3)
set(lua_PATCH_VERSION 5)
if (NOT MSVC)
add_definitions(-DLUA_USE_POSIX)
endif ()
add_library(lua STATIC
src/lapi.c
src/lauxlib.c

View File

@ -168,7 +168,7 @@ if(PHYSFS_BUILD_STATIC)
set(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs-static")
endif()
option(PHYSFS_BUILD_SHARED "Build shared library" TRUE)
option(PHYSFS_BUILD_SHARED "Build shared library" FALSE)
if(PHYSFS_BUILD_SHARED)
add_library(physfs SHARED ${PHYSFS_SRCS})
set_target_properties(physfs PROPERTIES MACOSX_RPATH 1)
@ -192,7 +192,7 @@ if(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC AND NOT WINDOWS)
set_target_properties(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
endif()
option(PHYSFS_BUILD_TEST "Build stdio test program." TRUE)
option(PHYSFS_BUILD_TEST "Build stdio test program." FALSE)
mark_as_advanced(PHYSFS_BUILD_TEST)
if(PHYSFS_BUILD_TEST)
find_path(READLINE_H readline/readline.h)

View File

@ -215,7 +215,9 @@ static Stats
lua_checkstats(lua_State *L, int index)
{
// Confirm table
lua_istable(L, index);
if (lua_istable(L, index)) {
fatal("Bad table provided");
}
// Push to top of stack
lua_pushvalue(L, index);