mirror of
https://github.com/love2d/megasource.git
synced 2026-08-20 04:30:45 +02:00
Remove partially implemented attempt to copy VS2015 c runtime system dlls, add support for VS2017
This commit is contained in:
+6
-21
@@ -67,11 +67,13 @@ endfunction()
|
|||||||
|
|
||||||
# Look for dynamic runtime DLLs.
|
# Look for dynamic runtime DLLs.
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(MSVC14)
|
if(MSVC_VERSION EQUAL 1910)
|
||||||
|
set(VSVERSION "141")
|
||||||
|
elseif(MSVC_VERSION EQUAL 1900)
|
||||||
set(VSVERSION "140")
|
set(VSVERSION "140")
|
||||||
elseif(MSVC12)
|
elseif(MSVC_VERSION EQUAL 1800)
|
||||||
set(VSVERSION "120")
|
set(VSVERSION "120")
|
||||||
elseif(MSVC11 OR MSVC10)
|
elseif(MSVC_VERSION LESS 1800)
|
||||||
message(WARNING "Visual Studio 2013 (VS12) or newer is required!")
|
message(WARNING "Visual Studio 2013 (VS12) or newer is required!")
|
||||||
else()
|
else()
|
||||||
message(WARNING "Cannot determine Visual Studio version!")
|
message(WARNING "Cannot determine Visual Studio version!")
|
||||||
@@ -85,11 +87,10 @@ if(MSVC)
|
|||||||
else()
|
else()
|
||||||
get_filename_component(VS_REDIST_DIR ${VSCOMNTOOLS}/../../VC/redist/${MEGA_ARCH}/Microsoft.VC${VSVERSION}.CRT ABSOLUTE)
|
get_filename_component(VS_REDIST_DIR ${VSCOMNTOOLS}/../../VC/redist/${MEGA_ARCH}/Microsoft.VC${VSVERSION}.CRT ABSOLUTE)
|
||||||
set(MSVCP_DLL ${VS_REDIST_DIR}/msvcp${VSVERSION}.dll)
|
set(MSVCP_DLL ${VS_REDIST_DIR}/msvcp${VSVERSION}.dll)
|
||||||
if(MSVC12)
|
if(MSVC_VERSION EQUAL 1800)
|
||||||
set(MSVCR_DLL ${VS_REDIST_DIR}/msvcr${VSVERSION}.dll)
|
set(MSVCR_DLL ${VS_REDIST_DIR}/msvcr${VSVERSION}.dll)
|
||||||
else()
|
else()
|
||||||
set(MSVCR_DLL ${VS_REDIST_DIR}/vcruntime${VSVERSION}.dll)
|
set(MSVCR_DLL ${VS_REDIST_DIR}/vcruntime${VSVERSION}.dll)
|
||||||
# TODO: add ucrtbase.dll from Program Files (x86)\Windows Kits\10\Redist\ucrt\ ($(UniversalCRT_LibraryPath_${MEGA_ARCH}))
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (EXISTS ${MSVCP_DLL} AND EXISTS ${MSVCR_DLL})
|
if (EXISTS ${MSVCP_DLL} AND EXISTS ${MSVCR_DLL})
|
||||||
@@ -99,22 +100,6 @@ if(MSVC)
|
|||||||
message(WARNING "Could not find Visual C and C++ runtime .dll files")
|
message(WARNING "Could not find Visual C and C++ runtime .dll files")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# FIXME: Find some way to avoid hard-coding the version and paths here...
|
|
||||||
if(MSVC14)
|
|
||||||
get_filename_component(UCRT_DIR "${VSCOMNTOOLS}/../../../Windows Kits/10" ABSOLUTE)
|
|
||||||
if(EXISTS ${UCRT_DIR})
|
|
||||||
set(UCRT_DLL ${UCRT_DIR}/Redist/ucrt/DLLs/${MEGA_ARCH}/ucrtbase.dll)
|
|
||||||
if(EXISTS ${UCRT_DLL})
|
|
||||||
set(MEGA_MSVC_DLLS ${MEGA_MSVC_DLLS} ${UCRT_DLL})
|
|
||||||
message(STATUS "Found universal C runtime .dll")
|
|
||||||
else()
|
|
||||||
message(STATUS "Could not find universal C runtime .dll")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(STATUS "Could not find universal C runtime folder")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Find vcvarsall.bat.
|
# Find vcvarsall.bat.
|
||||||
get_filename_component(VS_VCVARSALL_BAT ${VSCOMNTOOLS}/../../VC/vcvarsall.bat ABSOLUTE)
|
get_filename_component(VS_VCVARSALL_BAT ${VSCOMNTOOLS}/../../VC/vcvarsall.bat ABSOLUTE)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user