aboutsummaryrefslogtreecommitdiff
path: root/cmake/scripts/windows/ArchSetup.cmake
diff options
context:
space:
mode:
authorPär Björklund <per.bjorklund@gmail.com>2017-01-07 21:36:55 +0100
committerGitHub <noreply@github.com>2017-01-07 21:36:55 +0100
commitd5a07cf4de11b9badbf64438e1f92e153e5ee4b7 (patch)
tree48290f17c82badfbc111eaf47beb8c5690e15175 /cmake/scripts/windows/ArchSetup.cmake
parent257dd76f33c5245b9fa7b341a3a521da5cfacb46 (diff)
parent21dfc3bb64715d83a05f91b95ba9fd95e0447be5 (diff)
Merge pull request #11246 from fetzerch/cmake_win_deps
[cmake/win32] Don't use system wide installed dependencies
Diffstat (limited to 'cmake/scripts/windows/ArchSetup.cmake')
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index 7183df7197..2fd730adaa 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -18,6 +18,12 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependenci
set(PYTHON_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/include/python)
+# The find_* functions prefer PATH over CMAKE_PREFIX_PATH for dependencies.
+# Emptying PATH so that system installed libraries (MySql, Python) are not picked up.
+# The VS/bin directory has to be in PATH for example for NMake.
+get_filename_component(TOOLCHAIN_PATH ${CMAKE_CXX_COMPILER} DIRECTORY)
+set(ENV{PATH} "${TOOLCHAIN_PATH}")
+
# -------- Compiler options ---------