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%\include\SDL2
|
||||||
%DEPENDS% mkdir %PREFIX%\lib
|
%DEPENDS% mkdir %PREFIX%\lib
|
||||||
|
%DEPENDS% mkdir c:\lua
|
||||||
%DEPENDS% cd %TEMP%
|
%DEPENDS% cd %TEMP%
|
||||||
|
|
||||||
# SDL2
|
# SDL2
|
||||||
|
@ -65,6 +66,17 @@ before_build:
|
||||||
copy %PREFIX%\lib\SDL2.dll %APPVEYOR_BUILD_FOLDER% > nul
|
copy %PREFIX%\lib\SDL2.dll %APPVEYOR_BUILD_FOLDER% > nul
|
||||||
copy %PREFIX%\lib\cmocka.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:
|
build_script:
|
||||||
- |-
|
- |-
|
||||||
set Path=C:\MinGW\bin;%Path%
|
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 cmake .. && make -j2 && sudo make install ; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ../.. ; 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 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:
|
script:
|
||||||
- mkdir _build
|
- mkdir _build
|
||||||
|
|
|
@ -10,6 +10,8 @@ set(breakhack_MINOR_VERSION 0)
|
||||||
set(breakhack_PATCH_VERSION 6)
|
set(breakhack_PATCH_VERSION 6)
|
||||||
set(breakhack_RELEASE_TYPE "")
|
set(breakhack_RELEASE_TYPE "")
|
||||||
|
|
||||||
|
include(FindLua)
|
||||||
|
include(FindPhysFS)
|
||||||
include(build/cmake/FindSDL2.cmake)
|
include(build/cmake/FindSDL2.cmake)
|
||||||
include(build/cmake/FindSDL2_image.cmake)
|
include(build/cmake/FindSDL2_image.cmake)
|
||||||
include(build/cmake/FindSDL2_ttf.cmake)
|
include(build/cmake/FindSDL2_ttf.cmake)
|
||||||
|
@ -95,12 +97,21 @@ if (STEAM)
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT FOUND_LUA OR STEAM)
|
||||||
add_subdirectory(lua-5.3.5)
|
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)
|
add_subdirectory(physfs-3.0.1)
|
||||||
include_directories(
|
include_directories(physfs-3.0.1/src)
|
||||||
lua-5.3.5/src
|
set(PHYSFS_LIBRARY physfs-static)
|
||||||
physfs-3.0.1/src
|
else ()
|
||||||
)
|
include_directories(${PHYSFS_INCLUDES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${PROJECT_BINARY_DIR}
|
${PROJECT_BINARY_DIR}
|
||||||
|
@ -109,7 +120,6 @@ include_directories(
|
||||||
${SDL2_TTF_INCLUDE_DIR}
|
${SDL2_TTF_INCLUDE_DIR}
|
||||||
${SDL2_MIXER_INCLUDE_DIR}
|
${SDL2_MIXER_INCLUDE_DIR}
|
||||||
sqlite3
|
sqlite3
|
||||||
lua/src
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CMOCKA_FOUND)
|
if (CMOCKA_FOUND)
|
||||||
|
@ -208,13 +218,14 @@ add_executable(breakhack
|
||||||
set_source_files_properties(sqlite3/sqlite3.c COMPILE_FLAGS -w)
|
set_source_files_properties(sqlite3/sqlite3.c COMPILE_FLAGS -w)
|
||||||
|
|
||||||
target_link_libraries(breakhack
|
target_link_libraries(breakhack
|
||||||
lua
|
|
||||||
${CMAKE_DL_LIBS} # Sqlite needs DL libs
|
${CMAKE_DL_LIBS} # Sqlite needs DL libs
|
||||||
${SDL2_LIBRARY}
|
${SDL2_LIBRARY}
|
||||||
${SDL2MAIN_LIBRARY}
|
${SDL2MAIN_LIBRARY}
|
||||||
${SDL2_IMAGE_LIBRARY}
|
${SDL2_IMAGE_LIBRARY}
|
||||||
${SDL2_TTF_LIBRARY}
|
${SDL2_TTF_LIBRARY}
|
||||||
${SDL2_MIXER_LIBRARY}
|
${SDL2_MIXER_LIBRARY}
|
||||||
|
${LUA_LIBRARY}
|
||||||
|
${PHYSFS_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (STEAM)
|
if (STEAM)
|
||||||
|
@ -335,6 +346,7 @@ else (WIN32)
|
||||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
|
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
|
||||||
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||||
steamworks_c_wrapper/sdk/redistributable_bin/linux64/libsteam_api.so
|
steamworks_c_wrapper/sdk/redistributable_bin/linux64/libsteam_api.so
|
||||||
|
build/linux/breakhack.run
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
endif (WIN32)
|
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")
|
set(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs-static")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(PHYSFS_BUILD_SHARED "Build shared library" FALSE)
|
option(PHYSFS_BUILD_SHARED "Build shared library" TRUE)
|
||||||
if(PHYSFS_BUILD_SHARED)
|
if(PHYSFS_BUILD_SHARED)
|
||||||
add_library(physfs SHARED ${PHYSFS_SRCS})
|
add_library(physfs SHARED ${PHYSFS_SRCS})
|
||||||
set_target_properties(physfs PROPERTIES MACOSX_RPATH 1)
|
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)
|
set_target_properties(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||||
endif()
|
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)
|
mark_as_advanced(PHYSFS_BUILD_TEST)
|
||||||
if(PHYSFS_BUILD_TEST)
|
if(PHYSFS_BUILD_TEST)
|
||||||
find_path(READLINE_H readline/readline.h)
|
find_path(READLINE_H readline/readline.h)
|
||||||
|
|
Loading…
Reference in New Issue