From 934ed02750b77f8f687fb8f6e4c75d52e843519d Mon Sep 17 00:00:00 2001 From: David Grayson Date: Sat, 29 Apr 2017 09:53:31 -0700 Subject: [PATCH] cmake: Prevent it from looking for packages in / when cross-compiling for Windows. --- .../build-managers/cmake/search-path-3.2.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch b/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch index ba7438d2c0f9..623a7208a868 100644 --- a/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch +++ b/pkgs/development/tools/build-managers/cmake/search-path-3.2.patch @@ -62,3 +62,16 @@ diff -ru3 cmake-3.4.3/Modules/Platform/UnixPaths.cmake cmake-3.4.3-new/Modules/P ) # Enable use of lib64 search path variants by default. +diff -ur cmake-3.7.2-orig/Modules/Platform/WindowsPaths.cmake cmake-3.7.2/Modules/Platform/WindowsPaths.cmake +--- cmake-3.7.2-orig/Modules/Platform/WindowsPaths.cmake 2017-04-26 09:08:39.095674666 -0700 ++++ cmake-3.7.2/Modules/Platform/WindowsPaths.cmake 2017-04-28 22:32:10.379015998 -0700 +@@ -66,7 +66,7 @@ + + if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") + # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) +- list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) ++ # list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) + endif() + + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH +diff -ur cmake-3.7.2-orig/Source/cmFindPackageCommand.cxx cmake-3.7.2/Source/cmFindPackageCommand.cxx