Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
Toolchain should be used too
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Jul 26, 2016
1 parent f24bbf4 commit abd2dc7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmake/HunterGate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,19 @@ function(hunter_gate_download dir)
endif()

hunter_gate_status_debug("Run generate")

# Need to add toolchain file too.
# Otherwise on Visual Studio + MDD this will fail with error:
# "Could not find an appropriate version of the Windows 10 SDK installed on this machine"
if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
else()
# 'toolchain_arg' can't be empty
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=")
endif()

execute_process(
COMMAND "${CMAKE_COMMAND}" "-H${dir}" "-B${build_dir}" "-G${CMAKE_GENERATOR}"
COMMAND "${CMAKE_COMMAND}" "-H${dir}" "-B${build_dir}" "-G${CMAKE_GENERATOR}" "${toolchain_arg}"
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
Expand Down

0 comments on commit abd2dc7

Please sign in to comment.