QT CMakeLists.txt - define HAS_VDE when VDE is present, fixes VDE not being present in the menu anymore.

This commit is contained in:
OBattler
2025-08-08 18:10:47 +02:00
parent ce9c40e058
commit d4bce724b1

View File

@@ -62,6 +62,26 @@ if(APPLE AND USE_QT6)
find_package(Qt6Gui/Qt6QICNSPlugin REQUIRED)
endif()
if (UNIX)
find_path(HAS_VDE "libvdeplug.h" PATHS ${VDE_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" )
if(HAS_VDE)
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)
endif()
endif()
endif()
if (UNIX AND NOT APPLE) # Support for TAP on Linux and BSD, supposedly.
find_path(HAS_TAP "linux/if_tun.h" PATHS ${TAP_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" )
if(HAS_TAP)
add_compile_definitions(HAS_TAP)
else()
message(WARNING "TAP support not available. Are you on some BSD?")
endif()
endif()
add_library(plat STATIC
qt.c
qt_main.cpp