mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-27 05:00:23 +00:00
af398e3684
* Devtools: Pause system * Devtools: pm4 viewer - new menu bar - refactored video_info layer - dump & inspect pm4 packets - removed dumpPM4 config - renamed System to DebugState - add docking space - simple video info constrained to window size * Devtools: pm4 viewer - add combo to select the queue * Devtools: pm4 viewer - add hex editor * Devtools: pm4 viewer - dump current cmd * add monospaced font to devtools * Devtools: pm4 viewer - use spec op name avoid some allocations
188 lines
5.0 KiB
CMake
188 lines
5.0 KiB
CMake
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
set(BUILD_TESTING OFF)
|
|
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
|
|
|
|
if (MSVC)
|
|
# Silence "deprecation" warnings
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
|
endif()
|
|
|
|
# Boost
|
|
if (NOT TARGET Boost::headers)
|
|
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "")
|
|
set(Boost_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "")
|
|
set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "")
|
|
add_library(boost INTERFACE)
|
|
target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR})
|
|
add_library(Boost::headers ALIAS boost)
|
|
endif()
|
|
|
|
# fmtlib
|
|
if (NOT TARGET fmt::fmt)
|
|
add_subdirectory(fmt)
|
|
endif()
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
|
# If it is clang and MSVC we will add a static lib
|
|
# CryptoPP
|
|
add_subdirectory(cryptoppwin)
|
|
target_include_directories(cryptoppwin INTERFACE cryptoppwin/include)
|
|
else()
|
|
# CryptoPP
|
|
if (NOT TARGET cryptopp::cryptopp)
|
|
set(CRYPTOPP_INSTALL OFF)
|
|
set(CRYPTOPP_BUILD_TESTING OFF)
|
|
set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/)
|
|
add_subdirectory(cryptopp-cmake)
|
|
file(COPY cryptopp DESTINATION cryptopp FILES_MATCHING PATTERN "*.h")
|
|
target_include_directories(cryptopp INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/cryptopp")
|
|
endif()
|
|
endif()
|
|
|
|
if (NOT TARGET FFmpeg::ffmpeg)
|
|
add_subdirectory(ffmpeg-core)
|
|
add_library(FFmpeg::ffmpeg ALIAS ffmpeg)
|
|
endif()
|
|
|
|
# Zlib-Ng
|
|
if (NOT TARGET zlib-ng::zlib)
|
|
set(ZLIB_ENABLE_TESTS OFF)
|
|
set(WITH_GTEST OFF)
|
|
set(WITH_NEW_STRATEGIES ON)
|
|
set(WITH_NATIVE_INSTRUCTIONS ON)
|
|
add_subdirectory(zlib-ng)
|
|
add_library(zlib-ng::zlib ALIAS zlib)
|
|
endif()
|
|
|
|
# SDL3
|
|
if (NOT TARGET SDL3::SDL3)
|
|
set(SDL_PIPEWIRE OFF)
|
|
add_subdirectory(sdl3)
|
|
endif()
|
|
|
|
# vulkan-headers
|
|
if (NOT TARGET Vulkan::Headers)
|
|
set(VULKAN_HEADERS_ENABLE_MODULE OFF)
|
|
add_subdirectory(vulkan-headers)
|
|
endif()
|
|
|
|
# VMA
|
|
if (NOT TARGET GPUOpen::VulkanMemoryAllocator)
|
|
add_subdirectory(vma)
|
|
endif()
|
|
|
|
# RenderDoc
|
|
if (NOT TARGET RenderDoc::API)
|
|
add_library(renderdoc INTERFACE)
|
|
target_include_directories(renderdoc SYSTEM INTERFACE ./renderdoc)
|
|
add_library(RenderDoc::API ALIAS renderdoc)
|
|
endif()
|
|
|
|
# glslang
|
|
if (NOT TARGET glslang::glslang)
|
|
set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "")
|
|
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "")
|
|
set(ENABLE_SPVREMAPPER OFF CACHE BOOL "")
|
|
set(ENABLE_CTEST OFF CACHE BOOL "")
|
|
set(ENABLE_HLSL OFF CACHE BOOL "")
|
|
set(BUILD_EXTERNAL OFF CACHE BOOL "")
|
|
set(ENABLE_OPT OFF CACHE BOOL "")
|
|
add_subdirectory(glslang)
|
|
file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
|
|
target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
|
|
endif()
|
|
|
|
# Robin-map
|
|
if (NOT TARGET tsl::robin_map)
|
|
add_subdirectory(robin-map)
|
|
endif()
|
|
|
|
# Xbyak
|
|
if (NOT TARGET xbyak::xbyak)
|
|
add_subdirectory(xbyak)
|
|
endif()
|
|
|
|
# MagicEnum
|
|
if (NOT TARGET magic_enum::magic_enum)
|
|
add_subdirectory(magic_enum)
|
|
endif()
|
|
|
|
# Toml11
|
|
if (NOT TARGET toml11::toml11)
|
|
add_subdirectory(toml11)
|
|
endif()
|
|
|
|
# xxHash
|
|
if (NOT TARGET xxHash::xxhash)
|
|
add_library(xxhash xxhash/xxhash.h xxhash/xxhash.c)
|
|
target_include_directories(xxhash PUBLIC xxhash)
|
|
add_library(xxHash::xxhash ALIAS xxhash)
|
|
endif()
|
|
|
|
# Zydis
|
|
if (NOT TARGET Zydis::Zydis)
|
|
option(ZYDIS_BUILD_TOOLS "" OFF)
|
|
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
|
add_subdirectory(zydis)
|
|
endif()
|
|
|
|
# Winpthreads
|
|
if (WIN32)
|
|
add_subdirectory(winpthreads)
|
|
target_include_directories(winpthreads INTERFACE winpthreads/include)
|
|
endif()
|
|
|
|
# sirit
|
|
add_subdirectory(sirit)
|
|
if (WIN32)
|
|
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
|
|
endif()
|
|
|
|
if (APPLE)
|
|
# half
|
|
add_library(half INTERFACE)
|
|
target_include_directories(half INTERFACE half/include)
|
|
|
|
# date
|
|
if (NOT TARGET date::date-tz)
|
|
option(BUILD_TZ_LIB "" ON)
|
|
option(USE_SYSTEM_TZ_DB "" ON)
|
|
add_subdirectory(date)
|
|
endif()
|
|
endif()
|
|
|
|
# Dear ImGui
|
|
add_library(Dear_ImGui
|
|
dear_imgui/imgui.cpp
|
|
dear_imgui/imgui_demo.cpp
|
|
dear_imgui/imgui_draw.cpp
|
|
dear_imgui/imgui_internal.h
|
|
dear_imgui/imgui_tables.cpp
|
|
dear_imgui/imgui_widgets.cpp
|
|
)
|
|
target_include_directories(Dear_ImGui INTERFACE dear_imgui/)
|
|
|
|
# Tracy
|
|
option(TRACY_ENABLE "" ON)
|
|
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
|
option(TRACY_ON_DEMAND "" ON)
|
|
option(TRACY_NO_FRAME_IMAGE "" ON)
|
|
option(TRACY_FIBERS "" ON) # For AmdGpu frontend profiling
|
|
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
|
option(TRACY_NO_CALLSTACK "" ON)
|
|
option(TRACY_NO_CODE_TRANSFER "" ON)
|
|
option(TRACY_NO_SAMPLING "" ON)
|
|
option(TRACY_ONLY_LOCALHOST "" ON)
|
|
option(TRACY_NO_CONTEXT_SWITCH "" ON)
|
|
add_subdirectory(tracy)
|
|
|
|
# pugixml
|
|
if (NOT TARGET pugixml::pugixml)
|
|
add_subdirectory(pugixml)
|
|
endif()
|
|
|
|
# GCN Headers
|
|
add_subdirectory(gcn) |