diff --git a/.appveyor.yml b/.appveyor.yml index 87b31a5..abad920 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -54,12 +54,12 @@ before_build: %DEPENDS% copy SDL2_mixer-2.0.2\%ARCH%\bin\*.dll %PREFIX%\lib > nul # CMocka - - |- - %DEPENDS% appveyor DownloadFile https://cmocka.org/files/1.1/cmocka-1.1.0-mingw.zip - %DEPENDS% 7z x cmocka-1.1.0-mingw.zip > nul - %DEPENDS% copy cmocka-1.1.0\include\* %PREFIX%\include > nul - %DEPENDS% copy cmocka-1.1.0\lib\*.a %PREFIX%\lib > nul - %DEPENDS% copy cmocka-1.1.0\bin\*.dll %PREFIX%\lib > nul + #- |- + #%DEPENDS% appveyor DownloadFile https://cmocka.org/files/1.1/cmocka-1.1.0-mingw.zip + #%DEPENDS% 7z x cmocka-1.1.0-mingw.zip > nul + #%DEPENDS% copy cmocka-1.1.0\include\* %PREFIX%\include > nul + #%DEPENDS% copy cmocka-1.1.0\lib\*.a %PREFIX%\lib > nul + #%DEPENDS% copy cmocka-1.1.0\bin\*.dll %PREFIX%\lib > nul # Lua - |- diff --git a/.travis.yml b/.travis.yml index afb058e..3e19d07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,8 @@ before_install: install: - sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev - - sudo apt-get install -y cmake cmake-data lua5.2 liblua5.2-dev libcmocka0 libcmocka-dev + - sudo apt-get install -y cmake cmake-data lua5.2 liblua5.2-dev + #- sudo apt-get install -y libcmocka0 libcmocka-dev script: - mkdir build diff --git a/CMakeLists.txt b/CMakeLists.txt index bcf60ae..7e8942b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,16 +57,19 @@ IF ( GCC OR CLANG ) ) ENDIF ( GCC OR CLANG ) -if (NOT PHYSFS_FOUND) +if (NOT PHYSFS_FOUND OR WIN32) + set(PHYSFS_BUILD_SHARED TRUE) + set(PHYSFS_BUILD_STATIC TRUE) + set(PHYSFS_BUILD_TEST FALSE) add_subdirectory(physfs-3.0.1) include_directories( physfs-3.0.1/src ) -else (NOT PHYSFS_FOUND) +else () include_directories( ${PHYSFS_INCLUDE_DIR} ) -endif (NOT PHYSFS_FOUND) +endif () include_directories( ${PROJECT_BINARY_DIR} @@ -236,13 +239,18 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/bin/libpng16-16.dll ${CMAKE_SOURCE_DIR}/bin/libvorbis-0.dll ${CMAKE_SOURCE_DIR}/bin/libvorbisfile-3.dll - ${CMAKE_SOURCE_DIR}/bin/libphysfs.dll ${CMAKE_SOURCE_DIR}/bin/SDL2.dll ${CMAKE_SOURCE_DIR}/bin/SDL2_image.dll ${CMAKE_SOURCE_DIR}/bin/SDL2_mixer.dll ${CMAKE_SOURCE_DIR}/bin/SDL2_ttf.dll ${CMAKE_SOURCE_DIR}/bin/zlib1.dll ) + if (NOT PHYSFS_FOUND) + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS + ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} + ${CMAKE_BINARY_DIR}/physfs/libphysfs.dll + ) + endif () endif (WIN32) include(InstallRequiredSystemLibraries) diff --git a/test/test_util.c b/test/test_util.c index 19475b1..09d2487 100644 --- a/test/test_util.c +++ b/test/test_util.c @@ -16,9 +16,9 @@ * along with this program. If not, see . */ +#include #include #include -#include #include #include #include "../src/util.h"