Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from zrax/appveyor
Browse files Browse the repository at this point in the history
Add AppVeyor config
  • Loading branch information
zrax authored Jul 8, 2018
2 parents f4a73b9 + a3779cb commit b2a333d
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
60 changes: 60 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: '{build}'

environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
PREFIX_MSVC: 2013
PREFIX_ARCH: x86
PREFIX_STATIC: ON

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
PREFIX_MSVC: 2013
PREFIX_ARCH: x86
PREFIX_STATIC: OFF

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PREFIX_MSVC: 2015
PREFIX_ARCH: x86
PREFIX_STATIC: ON

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PREFIX_MSVC: 2015
PREFIX_ARCH: x86
PREFIX_STATIC: OFF

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PREFIX_MSVC: 2017
PREFIX_ARCH: x86
PREFIX_STATIC: ON

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PREFIX_MSVC: 2017
PREFIX_ARCH: x86
PREFIX_STATIC: OFF

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PREFIX_MSVC: 2017
PREFIX_ARCH: x64
PREFIX_STATIC: ON

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PREFIX_MSVC: 2017
PREFIX_ARCH: x64
PREFIX_STATIC: OFF

build_script:
- mkdir build && cd build
- if [%PREFIX_STATIC%]==[ON] (
set "PREFIX_DIR=prefix-vc%PREFIX_MSVC%-%PREFIX_ARCH%-static"
) else (
set "PREFIX_DIR=prefix-vc%PREFIX_MSVC%-%PREFIX_ARCH%"
)
- cmake -DBUILD_STATIC_LIBS=%PREFIX_STATIC% -DBUILD_ARCH=%PREFIX_ARCH%
-DMSVC_VERSION=%PREFIX_MSVC%
-DINSTALL_DIR="%APPVEYOR_BUILD_FOLDER%/%PREFIX_DIR%" ..
- cmake --build .
- cd "%APPVEYOR_BUILD_FOLDER%"
- cmake -E tar cf %PREFIX_DIR%.zip --format=zip %PREFIX_DIR%

artifacts:
- path: prefix-*.zip
6 changes: 4 additions & 2 deletions libpng.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ add_custom_target(libpng-release
)

if(BUILD_STATIC_LIBS)
add_custom_target(libpng
add_custom_target(libpng-postinst
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/include"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/share"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/lib/libpng"
Expand All @@ -74,7 +74,7 @@ if(BUILD_STATIC_LIBS)
DEPENDS libpng-debug libpng-release
)
else()
add_custom_target(libpng
add_custom_target(libpng-postinst
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/include"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/share"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/lib/libpng"
Expand All @@ -83,3 +83,5 @@ else()
DEPENDS libpng-debug libpng-release
)
endif()

add_custom_target(libpng ALL DEPENDS libpng-postinst)
2 changes: 1 addition & 1 deletion string_theory.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ unpack_tgz(string_theory-2.0.tar.gz string_theory-2.0)

add_custom_target(string_theory-build
COMMAND ${CMAKE_COMMAND} -G "${VCSLN_GENERATOR}"
-DST_BUILD_STATIC=${BUILD_STATIC_LIBS}
-DST_BUILD_STATIC=${BUILD_STATIC_LIBS} -DST_BUILD_TESTS=OFF
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-Hstring_theory-2.0 -Bstring_theory-release
COMMAND ${CMAKE_COMMAND} --build string_theory-release --config Debug
Expand Down
6 changes: 4 additions & 2 deletions zlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ add_custom_target(zlib-release
)

if(BUILD_STATIC_LIBS)
add_custom_target(zlib
add_custom_target(zlib-postinst
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/bin"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/include"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/share"
Expand All @@ -64,7 +64,7 @@ if(BUILD_STATIC_LIBS)
DEPENDS zlib-debug zlib-release
)
else()
add_custom_target(zlib
add_custom_target(zlib-postinst
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/include"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INSTALL_DIR}/debug/share"
COMMAND ${CMAKE_COMMAND} -E remove "${INSTALL_DIR}/debug/lib/zlibstaticd.lib"
Expand All @@ -73,3 +73,5 @@ else()
DEPENDS zlib-debug zlib-release
)
endif()

add_custom_target(zlib ALL DEPENDS zlib-postinst)

0 comments on commit b2a333d

Please sign in to comment.