mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 16:03:52 +00:00
Fix unicorn on vcpkg
This commit is contained in:
parent
06979e5c5c
commit
c425b14767
2 changed files with 25 additions and 21 deletions
|
|
@ -46,29 +46,25 @@ find_package(OpenSSL REQUIRED)
|
|||
find_package(Threads REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
if(WIN32)
|
||||
find_package(PkgConfig QUIET)
|
||||
# Use vcpkg's FFmpeg CMake integration on Windows
|
||||
find_package(FFMPEG QUIET)
|
||||
if(FFMPEG_FOUND)
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
message(STATUS "Found FFmpeg (vcpkg): ${FFMPEG_LIBRARIES}")
|
||||
else()
|
||||
set(HAVE_FFMPEG FALSE)
|
||||
message(WARNING "FFmpeg not found — video_player will be disabled. Install via vcpkg: ffmpeg:x64-windows")
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
endif()
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_check_modules(FFMPEG libavformat libavcodec libswscale libavutil)
|
||||
else()
|
||||
# Fallback for MSVC/vcpkg — find FFmpeg libraries manually
|
||||
find_path(FFMPEG_INCLUDE_DIRS libavformat/avformat.h)
|
||||
find_library(AVFORMAT_LIB NAMES avformat)
|
||||
find_library(AVCODEC_LIB NAMES avcodec)
|
||||
find_library(AVUTIL_LIB NAMES avutil)
|
||||
find_library(SWSCALE_LIB NAMES swscale)
|
||||
set(FFMPEG_LIBRARIES ${AVFORMAT_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB})
|
||||
endif()
|
||||
if(FFMPEG_INCLUDE_DIRS AND AVFORMAT_LIB)
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
message(STATUS "Found FFmpeg: ${AVFORMAT_LIB}")
|
||||
elseif(FFMPEG_FOUND)
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
else()
|
||||
set(HAVE_FFMPEG FALSE)
|
||||
message(WARNING "FFmpeg not found — video_player will be disabled. Install via vcpkg: ffmpeg:x64-windows")
|
||||
if(FFMPEG_FOUND)
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
message(STATUS "Found FFmpeg (pkg-config): ${FFMPEG_LIBRARIES}")
|
||||
else()
|
||||
set(HAVE_FFMPEG FALSE)
|
||||
message(WARNING "FFmpeg not found — video_player will be disabled.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Unicorn Engine (x86 emulator for cross-platform Warden module execution)
|
||||
|
|
@ -83,6 +79,9 @@ else()
|
|||
set(HAVE_UNICORN TRUE)
|
||||
endif()
|
||||
|
||||
# Vulkan Memory Allocator
|
||||
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
|
||||
|
||||
# GLM (header-only math library)
|
||||
find_package(glm QUIET)
|
||||
if(NOT glm_FOUND)
|
||||
|
|
@ -502,6 +501,9 @@ if(TARGET vk-bootstrap)
|
|||
target_link_libraries(wowee PRIVATE vk-bootstrap)
|
||||
endif()
|
||||
|
||||
# Link Vulkan Memory Allocator
|
||||
target_link_libraries(wowee PRIVATE GPUOpen::VulkanMemoryAllocator)
|
||||
|
||||
# Link Unicorn if available
|
||||
if(HAVE_UNICORN)
|
||||
target_link_libraries(wowee PRIVATE ${UNICORN_LIBRARY})
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
"glew",
|
||||
"glm",
|
||||
"zlib",
|
||||
"ffmpeg"
|
||||
"ffmpeg",
|
||||
"unicorn",
|
||||
"vulkan-memory-allocator"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue