macos: Update library bundling process, add vde to bundle (#3390)

Co-authored-by: cold-brewed <cold-brewed@users.noreply.github.com>
This commit is contained in:
cold-brewed
2023-06-09 10:37:05 -04:00
committed by GitHub
parent 90d85af304
commit 883b4c4be9
2 changed files with 25 additions and 26 deletions

View File

@@ -43,8 +43,13 @@ endif()
if (UNIX)
find_path(HAS_VDE "libvdeplug.h" PATHS ${VDE_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" )
if(HAS_VDE)
add_compile_definitions(HAS_VDE)
list(APPEND net_sources net_vde.c)
find_library(VDE_LIB vdeplug)
if (NOT VDE_LIB)
message(WARNING "Could not find VDE. The library will not be bundled and any related features will be disabled.")
else()
add_compile_definitions(HAS_VDE)
list(APPEND net_sources net_vde.c)
endif()
endif()
endif()