File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,23 @@ macro(build_install_botan)
88 get_github_latest_release_url("randombit" "Botan" )
99 endif ()
1010
11- # before 3.5.0 FetchContent_Declare(Botan URL ${Botan_DOWNLOAD_URL})
12- FetchContent_Declare(Botan URL https://github.com/randombit/botan/archive/refs/heads/master.zip)
11+ # [[ VS 17.11 the STL PR: microsoft/STL#4633 on April 27, 2024 Botan 3.5.0 or below, will build error ]]
12+ find_program (MSBUILD_EXECUTABLE msbuild)
13+ if (MSBUILD_EXECUTABLE)
14+ execute_process (COMMAND msbuild -version OUTPUT_VARIABLE msbuild_version OUTPUT_STRIP_TRAILING_WHITESPACE)
15+ message (STATUS "msbuild version: ${msbuild_version} " )
16+
17+ if (msbuild_version VERSION_GREATER "17.11" AND Botan_BUILD_VERSION VERSION_LESS_EQUAL "3.5.0" )
18+ message (STATUS "⚠️After msbuild version: ${msbuild_version} , Botan must greater than 3.5.0, using master branch" )
19+ FetchContent_Declare(Botan URL https://github.com/randombit/botan/archive/refs/heads/master.zip)
20+ else ()
21+ FetchContent_Declare(Botan URL ${Botan_DOWNLOAD_URL} )
22+ endif ()
23+
24+ else ()
25+ FetchContent_Declare(Botan URL ${Botan_DOWNLOAD_URL} )
26+ endif ()
27+
1328 FetchContent_GetProperties(Botan)
1429
1530 if (NOT Botan_POPULATED)
You can’t perform that action at this time.
0 commit comments