Pass CMAKE_GENERATOR_TOOLSET (cmake -T argument) to external projects

The dependencies introduced in #1620 cause an error when building natively on Windows, according to @ragundo. CMake is looking for build tools `v100`, which are part of VS2010 and won't work with DF/DFHack, even if they were installed.

Some of the Windows build scripts pass in `-T v140_xp` (from VS2015), so passing this option through to subprojects may help: https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_TOOLSET.html
develop
lethosor 2020-08-21 19:49:33 -04:00
parent c034276af5
commit 5a77c9037e
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 4 additions and 0 deletions

@ -19,6 +19,10 @@ add_subdirectory(clsocket)
ide_folder(clsocket "Depends")
# assemble environment args to pass on to dependency projects
if (NOT("${CMAKE_GENERATOR_TOOLSET}" STREQUAL ""))
list(APPEND CL_ARGS "-T" "${CMAKE_GENERATOR_TOOLSET}")
endif()
get_cmake_property(vars CACHE_VARIABLES)
foreach(var ${vars})
if(var MATCHES "^CMAKE_"