find_package(Python3 COMPONENTS Interpreter Development)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    set(THREADS_PREFER_PTHREAD_FLAG ON)
    find_package(Threads REQUIRED)
endif()

find_package(EASTL REQUIRED)
find_package(unordered_dense REQUIRED)
if(${ASAN})
    find_package(mimalloc-asan REQUIRED)
else()
    find_package(mimalloc REQUIRED)
endif()
find_package(stduuid REQUIRED)
find_package(SQLite3 REQUIRED)
find_package(rapidhash REQUIRED)
find_package(effolkronium_random REQUIRED)
find_package(flatbuffers CONFIG REQUIRED)

if(TRACY)
    find_package(Tracy REQUIRED)
endif()

if(${IS_MULTI_CONFIG})
    find_package(quill REQUIRED)
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
    find_package(quill REQUIRED)
endif()

find_package(glm REQUIRED)
find_package(lodepng REQUIRED)
find_package(imgui REQUIRED)

if(VULKAN)
    find_package(VulkanHeaders REQUIRED)
    find_package(vulkan-memory-allocator REQUIRED)
endif()

if(BUILD_TESTS)
    find_package(GTest REQUIRED)
    find_package(pixelmatch-cpp17 REQUIRED)
endif()

if(BUILD_BENCHMARKS)
    find_package(benchmark REQUIRED)
endif()