Skip to content

Commit

Permalink
[cmake/win32] Don't use system wide installed dependencies
Browse files Browse the repository at this point in the history
Empty PATH (except VS Toolchain/bin) so that CMake won't pick up system
wide installed dependencies (such as MySql or Python).
  • Loading branch information
fetzerch committed Dec 22, 2016
1 parent c4da9e8 commit 21dfc3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/scripts/windows/ArchSetup.cmake
Expand Up @@ -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 ---------

Expand Down

0 comments on commit 21dfc3b

Please sign in to comment.