aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fetzer <fetzer.ch@gmail.com>2016-09-25 00:06:22 +0200
committerGitHub <noreply@github.com>2016-09-25 00:06:22 +0200
commitcbe09d121b9bfb645e1ae3e13da291361099016d (patch)
tree2d838691077cee90443c24a4d218ade6a1369bfe
parent755478723a306a0a5735e303aa2699a74429202c (diff)
parent5e07753226ebe8d58241ac3a7bd68b2a1d858db9 (diff)
Merge pull request #10396 from fetzerch/cmake_win_3.6
[cmake/win32] Bump minimum CMake version to 3.6
-rw-r--r--appveyor.yml16
-rw-r--r--project/BuildDependencies/scripts/get_formed.cmd2
-rw-r--r--project/cmake/scripts/common/GeneratorSetup.cmake5
3 files changed, 15 insertions, 8 deletions
diff --git a/appveyor.yml b/appveyor.yml
index a448c0e5e0..21881ac0f8 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -13,10 +13,12 @@ environment:
# - ADDONS: screensaver
# - ADDONS: visualization
+init:
+ - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+
install:
- SET PATH=C:\Program Files (x86)\CMake\bin;C:\msys64\bin;C:\msys64\usr\bin;%PATH%
- bash -lc "pacman --needed --noconfirm -Sy"
- - bash -lc "pacman --needed --noconfirm -S curl"
- mklink /j %APPVEYOR_BUILD_FOLDER%\project\BuildDependencies\msys64 C:\msys64
build_script:
@@ -41,10 +43,10 @@ build_script:
# Download precompiled mingw32 libraries
# To run make-mingwlibs.bat on AppVeyor takes too long,
# we must use precompiled libs to speed up build
- bash -c "curl http://repo.msys2.org/mingw/i686/mingw-w64-i686-ffmpeg-3.1.1-1-any.pkg.tar.xz | tar xJv"
- bash -c "curl http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdcss-1.4.0-1-any.pkg.tar.xz | tar xJv"
- bash -c "curl http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdnav-5.0.3-1-any.pkg.tar.xz | tar xJv"
- bash -c "curl http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdread-5.0.3-1-any.pkg.tar.xz | tar xJv"
+ bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-ffmpeg-3.1.1-1-any.pkg.tar.xz | tar xJv"
+ bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdcss-1.4.0-1-any.pkg.tar.xz | tar xJv"
+ bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdnav-5.0.3-1-any.pkg.tar.xz | tar xJv"
+ bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdread-5.0.3-1-any.pkg.tar.xz | tar xJv"
# Rename all precompiled lib*.dll.a -> *.lib, so MSVC will find them
Get-ChildItem mingw32\lib\lib*.dll.a | %{
$new_name = $_.Name.SubString(3) -replace ".dll.a", ".lib"
@@ -57,8 +59,8 @@ build_script:
# Build
mkdir $env:APPVEYOR_BUILD_FOLDER\kodi-build
cd $env:APPVEYOR_BUILD_FOLDER\kodi-build
- cmake -G "Visual Studio 14" ..\project\cmake
- cmake --build . --target all_build --config RelWithDebInfo
+ cmd /c 'cmake -G "Visual Studio 14" ..\project\cmake 2>&1'
+ cmd /c 'cmake --build . --target all_build --config RelWithDebInfo 2>&1'
}
#
diff --git a/project/BuildDependencies/scripts/get_formed.cmd b/project/BuildDependencies/scripts/get_formed.cmd
index 9d424a2741..b4db261935 100644
--- a/project/BuildDependencies/scripts/get_formed.cmd
+++ b/project/BuildDependencies/scripts/get_formed.cmd
@@ -59,7 +59,7 @@ IF EXIST %1 (
) ELSE (
CALL :setSubStageName Downloading %1...
SET DOWNLOAD_URL=%KODI_MIRROR%/build-deps/win32/%1
- %WGET% "!DOWNLOAD_URL!" || ECHO %1^|Download of !DOWNLOAD_URL! failed >> %FORMED_FAILED_LIST% && EXIT /B 7
+ %WGET% "!DOWNLOAD_URL!" 2>&1 || ECHO %1^|Download of !DOWNLOAD_URL! failed >> %FORMED_FAILED_LIST% && EXIT /B 7
TITLE Getting %1
)
diff --git a/project/cmake/scripts/common/GeneratorSetup.cmake b/project/cmake/scripts/common/GeneratorSetup.cmake
index 47b43deae3..304b5042e7 100644
--- a/project/cmake/scripts/common/GeneratorSetup.cmake
+++ b/project/cmake/scripts/common/GeneratorSetup.cmake
@@ -38,6 +38,11 @@ if(APPLE AND CMAKE_VERSION VERSION_LESS 3.4)
"or the usage of the patched version in depends.")
endif()
+# Windows needs CMake 3.6 (VS_STARTUP_PROJECT)
+if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.6)
+ message(FATAL_ERROR "Build on Windows needs CMake 3.6 or later")
+endif()
+
# Ninja needs CMake 3.2 due to ExternalProject BUILD_BYPRODUCTS usage
if(CMAKE_GENERATOR STREQUAL Ninja AND CMAKE_VERSION VERSION_LESS 3.2)
message(FATAL_ERROR "Generator: Ninja requires CMake 3.2 or later")