File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ if (MSVC)
4040 DEPENDEES configure
4141 DEPENDERS build
4242 COMMAND echo "Build Debug"
43- COMMAND ${MESON_EXECUTABLE} setup ${CMAKE_BINARY_DIR} /dav1d/build_debug --backend vs2022 --buildtype debug
43+ COMMAND ${MESON_EXECUTABLE} setup ${CMAKE_BINARY_DIR} /dav1d/build_debug --backend ${MSVC_NAME} --buildtype debug
4444 --default-library static -Denable_tools=false -Denable_tests=false --prefix ${CMAKE_BINARY_DIR} /dav1d/install
4545 COMMAND ${CMAKE_VS_MSBUILD_COMMAND} ${CMAKE_BINARY_DIR} /dav1d/build_debug/dav1d.sln
4646 COMMAND ${CMAKE_VS_MSBUILD_COMMAND} ${CMAKE_BINARY_DIR} /dav1d/build_debug/RUN_INSTALL.vcxproj
Original file line number Diff line number Diff line change @@ -8,6 +8,24 @@ cmake_minimum_required(VERSION 3.28) # for FetchContent's EXCLUDE_FROM_ALL
88if (NOT _EXTERNAL_PROJECT_INCLUDE_GUARD_)
99 set (_EXTERNAL_PROJECT_INCLUDE_GUARD_ ON )
1010
11+
12+ if (MSVC )
13+ if (MSVC_VERSION GREATER_EQUAL 1950)
14+ set (MSVC_NAME "vs2026" )
15+ elseif (MSVC_VERSION GREATER_EQUAL 1930)
16+ set (MSVC_NAME "vs2022" )
17+ elseif (MSVC_VERSION GREATER_EQUAL 1920)
18+ set (MSVC_NAME "vs2019" )
19+ elseif (MSVC_VERSION GREATER_EQUAL 1910)
20+ set (MSVC_NAME "vs2017" )
21+ elseif (MSVC_VERSION GREATER_EQUAL 1900)
22+ set (MSVC_NAME "vs2015" )
23+ else ()
24+ message ("Unsupported MSVC version: ${MSVC_VERSION} " )
25+ endif ()
26+ endif ()
27+
28+
1129 include (FetchContent )
1230 include (ExternalProject )
1331
You can’t perform that action at this time.
0 commit comments