2024-02-03 07:12:40 +00:00
|
|
|
if(ENABLE_SDL2)
|
2024-04-04 07:04:52 +00:00
|
|
|
find_package(SDL2 2.30.2 REQUIRED)
|
2024-02-03 07:12:40 +00:00
|
|
|
endif()
|
|
|
|
if(NOT WIN32 AND NOT ANDROID)
|
2024-03-06 06:16:50 +00:00
|
|
|
# From PCSX2: On macOS, Mono.framework contains an ancient version of libpng. We don't want that.
|
|
|
|
# Avoid it by telling cmake to avoid finding frameworks while we search for libpng.
|
|
|
|
if(APPLE)
|
|
|
|
set(FIND_FRAMEWORK_BACKUP ${CMAKE_FIND_FRAMEWORK})
|
|
|
|
set(CMAKE_FIND_FRAMEWORK NEVER)
|
|
|
|
endif()
|
|
|
|
|
2024-03-24 04:07:32 +00:00
|
|
|
find_package(Zstd 1.5.5 REQUIRED)
|
|
|
|
find_package(WebP REQUIRED) # v1.3.2, spews an error on Linux because no pkg-config.
|
2024-03-25 14:45:04 +00:00
|
|
|
find_package(ZLIB REQUIRED) # 1.3, but Mac currently doesn't use it.
|
2024-03-24 04:07:32 +00:00
|
|
|
find_package(PNG 1.6.40 REQUIRED)
|
|
|
|
find_package(JPEG REQUIRED) # No version because flatpak uses libjpeg-turbo.
|
2024-03-06 06:16:50 +00:00
|
|
|
find_package(CURL REQUIRED)
|
2024-04-04 09:24:47 +00:00
|
|
|
find_package(Freetype 2.13.1 REQUIRED)
|
2024-04-05 05:28:33 +00:00
|
|
|
|
|
|
|
if(ENABLE_VULKAN OR APPLE)
|
|
|
|
find_package(Shaderc REQUIRED)
|
|
|
|
endif()
|
|
|
|
|
2024-03-06 06:16:50 +00:00
|
|
|
if(APPLE)
|
|
|
|
set(CMAKE_FIND_FRAMEWORK ${FIND_FRAMEWORK_BACKUP})
|
|
|
|
endif()
|
2024-02-03 07:12:40 +00:00
|
|
|
endif()
|
2024-02-29 14:50:31 +00:00
|
|
|
if(LINUX AND NOT ANDROID)
|
|
|
|
find_package(UDEV REQUIRED)
|
|
|
|
endif()
|
2024-02-03 07:12:40 +00:00
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
find_package(Libbacktrace)
|
|
|
|
if(NOT LIBBACKTRACE_FOUND)
|
|
|
|
message(WARNING "libbacktrace not found, crashes will not produce backtraces.")
|
|
|
|
endif()
|
|
|
|
endif()
|