2024-02-27 19:24:47 +01:00
|
|
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
# Silence "deprecation" warnings
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
2024-04-14 16:09:51 +02:00
|
|
|
# Boost
|
|
|
|
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/boost" CACHE STRING "")
|
|
|
|
set(Boost_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/boost" CACHE STRING "")
|
|
|
|
set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "")
|
|
|
|
add_library(boost INTERFACE)
|
|
|
|
target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR})
|
|
|
|
|
2024-04-13 21:37:21 +02:00
|
|
|
# fmtlib
|
|
|
|
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
|
|
|
|
2024-02-27 19:24:47 +01:00
|
|
|
# Discord-RPC
|
|
|
|
set(BUILD_EXAMPLES OFF CACHE BOOL "")
|
|
|
|
add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
|
|
|
|
target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
|
|
|
|
|
2024-02-29 23:00:35 +01:00
|
|
|
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 EXCLUDE_FROM_ALL)
|
|
|
|
target_include_directories(cryptoppwin INTERFACE cryptoppwin/include)
|
|
|
|
else()
|
|
|
|
# CryptoPP
|
|
|
|
set(CRYPTOPP_BUILD_TESTING OFF)
|
|
|
|
set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/)
|
|
|
|
add_subdirectory(cryptopp-cmake EXCLUDE_FROM_ALL)
|
|
|
|
endif()
|
|
|
|
|
2024-03-22 17:12:37 +01:00
|
|
|
# Zlib-Ng
|
|
|
|
set(ZLIB_ENABLE_TESTS OFF)
|
|
|
|
set(WITH_GTEST OFF)
|
|
|
|
set(WITH_NEW_STRATEGIES ON)
|
|
|
|
set(WITH_NATIVE_INSTRUCTIONS ON)
|
|
|
|
add_subdirectory(zlib-ng)
|
2024-02-27 19:24:47 +01:00
|
|
|
|
2024-03-22 17:12:37 +01:00
|
|
|
# SDL3
|
|
|
|
add_subdirectory(sdl3 EXCLUDE_FROM_ALL)
|
2024-04-14 16:09:51 +02:00
|
|
|
|
|
|
|
# vulkan-headers
|
|
|
|
add_library(vulkan-headers INTERFACE)
|
|
|
|
target_include_directories(vulkan-headers SYSTEM INTERFACE ./vulkan-headers/include)
|
|
|
|
|
|
|
|
# VMA
|
|
|
|
add_library(vma INTERFACE)
|
|
|
|
target_include_directories(vma SYSTEM INTERFACE ./vma/include)
|
|
|
|
|
|
|
|
# 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)
|
|
|
|
|
|
|
|
# Robin-map
|
2024-05-01 12:38:41 +02:00
|
|
|
add_subdirectory(robin-map EXCLUDE_FROM_ALL)
|
|
|
|
|
|
|
|
# Xbyak
|
|
|
|
add_subdirectory(xbyak EXCLUDE_FROM_ALL)
|
2024-05-09 22:45:09 +02:00
|
|
|
|
2024-05-18 19:05:18 +02:00
|
|
|
# MagicEnum
|
|
|
|
add_subdirectory(magic_enum EXCLUDE_FROM_ALL)
|
|
|
|
|
|
|
|
# Toml11
|
|
|
|
add_subdirectory(toml11 EXCLUDE_FROM_ALL)
|
|
|
|
|
|
|
|
# xxHash
|
2024-05-25 14:33:15 +02:00
|
|
|
add_library(xxhash xxhash/xxhash.h xxhash/xxhash.c)
|
|
|
|
target_include_directories(xxhash PUBLIC xxhash)
|
2024-05-18 19:05:18 +02:00
|
|
|
|
|
|
|
# Zydis
|
|
|
|
option(ZYDIS_BUILD_TOOLS "" OFF)
|
|
|
|
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
|
|
|
add_subdirectory(zydis EXCLUDE_FROM_ALL)
|
|
|
|
|
2024-05-09 22:45:09 +02:00
|
|
|
# Winpthreads
|
|
|
|
if (WIN32)
|
|
|
|
add_subdirectory(winpthreads EXCLUDE_FROM_ALL)
|
|
|
|
target_include_directories(winpthreads INTERFACE winpthreads/include)
|
|
|
|
endif()
|
2024-05-22 00:35:12 +02:00
|
|
|
|
|
|
|
# sirit
|
|
|
|
add_subdirectory(sirit EXCLUDE_FROM_ALL)
|
2024-05-22 13:18:05 +02:00
|
|
|
if (WIN32)
|
|
|
|
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
|
2024-05-25 14:33:15 +02:00
|
|
|
endif()
|
2024-06-10 17:20:49 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
add_subdirectory(tracy EXCLUDE_FROM_ALL)
|