mirror of
https://github.com/reactos/CMake.git
synced 2025-02-19 11:00:58 +00:00
Merge branch 'vs15-GNUtoMS' into release
This commit is contained in:
commit
67a7e090f8
@ -144,10 +144,23 @@ macro(__windows_compiler_gnu_abi lang)
|
|||||||
|
|
||||||
if(CMAKE_GNUtoMS AND NOT CMAKE_GNUtoMS_LIB)
|
if(CMAKE_GNUtoMS AND NOT CMAKE_GNUtoMS_LIB)
|
||||||
# Find MS development environment setup script for this architecture.
|
# Find MS development environment setup script for this architecture.
|
||||||
|
# We need to use the MS Librarian tool (lib.exe).
|
||||||
|
# Find the most recent version available.
|
||||||
|
|
||||||
|
# Query the VS Installer tool for locations of VS 2017 and above.
|
||||||
|
set(_vs_installer_paths "")
|
||||||
|
foreach(vs RANGE 15 15 -1) # change the first number to the largest supported version
|
||||||
|
cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR)
|
||||||
|
if(_vs_dir)
|
||||||
|
list(APPEND _vs_installer_paths "${_vs_dir}/VC/Auxiliary/Build")
|
||||||
|
endif()
|
||||||
|
endforeach(vs)
|
||||||
|
|
||||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
|
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
|
||||||
find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvars32.bat
|
find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvars32.bat
|
||||||
DOC "Visual Studio vcvars32.bat"
|
DOC "Visual Studio vcvars32.bat"
|
||||||
PATHS
|
PATHS
|
||||||
|
${_vs_installer_paths}
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\VC;ProductDir]/bin"
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\VC;ProductDir]/bin"
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VC;ProductDir]/bin"
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VC;ProductDir]/bin"
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC;ProductDir]/bin"
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC;ProductDir]/bin"
|
||||||
@ -162,6 +175,7 @@ macro(__windows_compiler_gnu_abi lang)
|
|||||||
find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvars64.bat vcvarsamd64.bat
|
find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvars64.bat vcvarsamd64.bat
|
||||||
DOC "Visual Studio vcvarsamd64.bat"
|
DOC "Visual Studio vcvarsamd64.bat"
|
||||||
PATHS
|
PATHS
|
||||||
|
${_vs_installer_paths}
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\VC;ProductDir]/bin/amd64"
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\VC;ProductDir]/bin/amd64"
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VC;ProductDir]/bin/amd64"
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VC;ProductDir]/bin/amd64"
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC;ProductDir]/bin/amd64"
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC;ProductDir]/bin/amd64"
|
||||||
@ -171,6 +185,7 @@ macro(__windows_compiler_gnu_abi lang)
|
|||||||
)
|
)
|
||||||
set(CMAKE_GNUtoMS_ARCH amd64)
|
set(CMAKE_GNUtoMS_ARCH amd64)
|
||||||
endif()
|
endif()
|
||||||
|
unset(_vs_installer_paths)
|
||||||
set_property(CACHE CMAKE_GNUtoMS_VCVARS PROPERTY ADVANCED 1)
|
set_property(CACHE CMAKE_GNUtoMS_VCVARS PROPERTY ADVANCED 1)
|
||||||
if(CMAKE_GNUtoMS_VCVARS)
|
if(CMAKE_GNUtoMS_VCVARS)
|
||||||
# Create helper script to run lib.exe from MS environment.
|
# Create helper script to run lib.exe from MS environment.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user