Fixing the build
This commit is contained in:
parent
321dc4f3af
commit
ccf1ec979b
|
@ -14,6 +14,7 @@ before_build:
|
|||
- |-
|
||||
%DEPENDS% mkdir %PREFIX%\include\SDL2
|
||||
%DEPENDS% mkdir %PREFIX%\lib
|
||||
%DEPENDS% mkdir c:\lua
|
||||
%DEPENDS% cd %TEMP%
|
||||
|
||||
# SDL2
|
||||
|
@ -65,6 +66,17 @@ 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%
|
||||
|
|
|
@ -32,6 +32,7 @@ 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
|
||||
|
|
|
@ -10,6 +10,8 @@ set(breakhack_MINOR_VERSION 0)
|
|||
set(breakhack_PATCH_VERSION 6)
|
||||
set(breakhack_RELEASE_TYPE "")
|
||||
|
||||
include(FindLua)
|
||||
include(FindPhysFS)
|
||||
include(build/cmake/FindSDL2.cmake)
|
||||
include(build/cmake/FindSDL2_image.cmake)
|
||||
include(build/cmake/FindSDL2_ttf.cmake)
|
||||
|
@ -95,12 +97,21 @@ if (STEAM)
|
|||
)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(lua-5.3.5)
|
||||
add_subdirectory(physfs-3.0.1)
|
||||
include_directories(
|
||||
lua-5.3.5/src
|
||||
physfs-3.0.1/src
|
||||
)
|
||||
if (NOT FOUND_LUA OR STEAM)
|
||||
add_subdirectory(lua-5.3.5)
|
||||
include_directories(lua-5.3.5/src)
|
||||
set(LUA_LIBRARY lua)
|
||||
else ()
|
||||
include_directories(${LUA_INCLUDES})
|
||||
endif ()
|
||||
|
||||
if (NOT FOUND_PHYSFS OR STEAM)
|
||||
add_subdirectory(physfs-3.0.1)
|
||||
include_directories(physfs-3.0.1/src)
|
||||
set(PHYSFS_LIBRARY physfs-static)
|
||||
else ()
|
||||
include_directories(${PHYSFS_INCLUDES})
|
||||
endif ()
|
||||
|
||||
include_directories(
|
||||
${PROJECT_BINARY_DIR}
|
||||
|
@ -109,7 +120,6 @@ include_directories(
|
|||
${SDL2_TTF_INCLUDE_DIR}
|
||||
${SDL2_MIXER_INCLUDE_DIR}
|
||||
sqlite3
|
||||
lua/src
|
||||
)
|
||||
|
||||
if (CMOCKA_FOUND)
|
||||
|
@ -208,13 +218,14 @@ add_executable(breakhack
|
|||
set_source_files_properties(sqlite3/sqlite3.c COMPILE_FLAGS -w)
|
||||
|
||||
target_link_libraries(breakhack
|
||||
lua
|
||||
${CMAKE_DL_LIBS} # Sqlite needs DL libs
|
||||
${SDL2_LIBRARY}
|
||||
${SDL2MAIN_LIBRARY}
|
||||
${SDL2_IMAGE_LIBRARY}
|
||||
${SDL2_TTF_LIBRARY}
|
||||
${SDL2_MIXER_LIBRARY}
|
||||
${LUA_LIBRARY}
|
||||
${PHYSFS_LIBRARY}
|
||||
)
|
||||
|
||||
if (STEAM)
|
||||
|
@ -335,6 +346,7 @@ else (WIN32)
|
|||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
|
||||
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
steamworks_c_wrapper/sdk/redistributable_bin/linux64/libsteam_api.so
|
||||
build/linux/breakhack.run
|
||||
)
|
||||
endif ()
|
||||
endif (WIN32)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
|
||||
exec ./breakhack
|
|
@ -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" FALSE)
|
||||
option(PHYSFS_BUILD_SHARED "Build shared library" TRUE)
|
||||
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." FALSE)
|
||||
option(PHYSFS_BUILD_TEST "Build stdio test program." TRUE)
|
||||
mark_as_advanced(PHYSFS_BUILD_TEST)
|
||||
if(PHYSFS_BUILD_TEST)
|
||||
find_path(READLINE_H readline/readline.h)
|
||||
|
|
Loading…
Reference in New Issue