Skip to content

Commit

Permalink
Support required .exe suffix for Windows builds (#288)
Browse files Browse the repository at this point in the history
Windows builds generate executable files with .exe suffix. The ubpf_plugin needs to be addressed accordingly.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
  • Loading branch information
hawkinsw committed Jun 13, 2023
1 parent d7f7361 commit 91f1e6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ubpf_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR
set(PLUGIN_JIT --plugin_path ${CMAKE_BINARY_DIR}/bin/run-jit.sh)
set(PLUGIN_INTERPRET --plugin_path ${CMAKE_BINARY_DIR}/bin/run-interpret.sh)
else()
set(PLUGIN_JIT --plugin_path ${CMAKE_BINARY_DIR}/bin/ubpf_plugin --plugin_options --jit)
set(PLUGIN_INTERPRET --plugin_path ${CMAKE_BINARY_DIR}/bin/ubpf_plugin --plugin_options --interpret)
if(PLATFORM_WINDOWS)
set(PLATFORM_EXECUTABLE_EXTENSION ".exe")
else()
set(PLATFORM_EXECUTABLE_EXTENSION "")
endif()
set(PLUGIN_JIT --plugin_path ${CMAKE_BINARY_DIR}/bin/ubpf_plugin${PLATFORM_EXECUTABLE_EXTENSION} --plugin_options --jit)
set(PLUGIN_INTERPRET --plugin_path ${CMAKE_BINARY_DIR}/bin/ubpf_plugin${PLATFORM_EXECUTABLE_EXTENSION} --plugin_options --interpret)
endif()

foreach(file ${files})
Expand Down

0 comments on commit 91f1e6f

Please sign in to comment.