File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,15 @@ function(viamcppsdk_get_buf)
5151 else ()
5252 message (FATAL_ERROR "Unknown Windows platform to correct buf download URL: ${HOST_SYSTEM_PROCESSOR_FOR_BUF_DOWNLOAD} " )
5353 endif ()
54+ set (_buf_exe_suffix ".exe" )
5455 endif ()
5556
56- set (BUF_DOWNLOAD_URL https://github.com/bufbuild/buf/releases/latest/download/buf-${CMAKE_HOST_SYSTEM_NAME} -${HOST_SYSTEM_PROCESSOR_FOR_BUF_DOWNLOAD}${CMAKE_HOST_EXECUTABLE_SUFFIX } )
57+ set (BUF_DOWNLOAD_URL https://github.com/bufbuild/buf/releases/latest/download/buf-${CMAKE_HOST_SYSTEM_NAME} -${HOST_SYSTEM_PROCESSOR_FOR_BUF_DOWNLOAD}${_buf_exe_suffix } )
5758
5859 file (
5960 DOWNLOAD
6061 ${BUF_DOWNLOAD_URL}
61- ${CMAKE_CURRENT_BINARY_DIR} /buf_latest${CMAKE_HOST_EXECUTABLE_SUFFIX }
62+ ${CMAKE_CURRENT_BINARY_DIR} /buf_latest${_buf_exe_suffix }
6263 STATUS buf_status
6364 )
6465
@@ -69,6 +70,6 @@ function(viamcppsdk_get_buf)
6970 message (FATAL_ERROR "No local `buf` program found (try setting PATH?) and failed to download: ${buf_status_string} for ${BUF_DOWNLOAD_URL} " )
7071 endif ()
7172
72- set (BUF_COMMAND ${CMAKE_CURRENT_BINARY_DIR} /buf_latest${CMAKE_HOST_EXECUTABLE_SUFFIX } CACHE INTERNAL "buf command" )
73+ set (BUF_COMMAND ${CMAKE_CURRENT_BINARY_DIR} /buf_latest${_buf_exe_suffix } CACHE INTERNAL "buf command" )
7374 file (CHMOD ${BUF_COMMAND} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
7475endfunction ()
You can’t perform that action at this time.
0 commit comments