Merge pull request #6833 from abouvier/unbundle
cmake: prefer system libraries
This commit is contained in:
commit
3b19f741bd
|
@ -43,8 +43,6 @@ option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
||||||
|
|
||||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
|
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
|
||||||
|
|
||||||
option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
|
|
||||||
|
|
||||||
option(YUZU_TESTS "Compile tests" ON)
|
option(YUZU_TESTS "Compile tests" ON)
|
||||||
|
|
||||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||||
|
@ -201,24 +199,39 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||||
# System imported libraries
|
# System imported libraries
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
|
|
||||||
find_package(fmt 8.0.1 REQUIRED CONFIG)
|
find_package(enet 1.3)
|
||||||
find_package(nlohmann_json 3.8 REQUIRED CONFIG)
|
find_package(fmt 9 REQUIRED)
|
||||||
|
find_package(inih)
|
||||||
|
find_package(lz4 1.8 REQUIRED)
|
||||||
|
find_package(nlohmann_json 3.8 REQUIRED)
|
||||||
|
find_package(Opus 1.3)
|
||||||
|
find_package(Vulkan 1.3.213)
|
||||||
find_package(ZLIB 1.2 REQUIRED)
|
find_package(ZLIB 1.2 REQUIRED)
|
||||||
|
find_package(zstd 1.5 REQUIRED)
|
||||||
|
|
||||||
# Search for config-only package first (for vcpkg), then try non-config
|
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||||
find_package(zstd 1.5 CONFIG)
|
find_package(xbyak 6)
|
||||||
if (NOT zstd_FOUND)
|
|
||||||
find_package(zstd 1.5 REQUIRED)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# lz4 1.8 is required, but vcpkg's lz4-config.cmake does not have version info
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
find_package(lz4 CONFIG)
|
find_package(dynarmic 6.2.4)
|
||||||
if (NOT lz4_FOUND)
|
endif()
|
||||||
find_package(lz4 1.8 REQUIRED)
|
|
||||||
|
if (ENABLE_CUBEB)
|
||||||
|
find_package(cubeb)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (USE_DISCORD_PRESENCE)
|
||||||
|
find_package(DiscordRPC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_WEB_SERVICE)
|
||||||
|
find_package(cpp-jwt 1.4)
|
||||||
|
find_package(httplib 0.11)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_TESTS)
|
if (YUZU_TESTS)
|
||||||
find_package(Catch2 2.13.7 REQUIRED CONFIG)
|
find_package(Catch2 2.13.7 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost 1.73.0 COMPONENTS context)
|
find_package(Boost 1.73.0 COMPONENTS context)
|
||||||
|
|
|
@ -6,15 +6,16 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/externals/find-modules")
|
||||||
include(DownloadExternals)
|
include(DownloadExternals)
|
||||||
|
|
||||||
# xbyak
|
# xbyak
|
||||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
if ((ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) AND NOT TARGET xbyak::xbyak)
|
||||||
add_subdirectory(xbyak EXCLUDE_FROM_ALL)
|
add_subdirectory(xbyak EXCLUDE_FROM_ALL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Dynarmic
|
# Dynarmic
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) AND NOT TARGET dynarmic::dynarmic)
|
||||||
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
set(DYNARMIC_NO_BUNDLED_FMT ON)
|
||||||
set(DYNARMIC_IGNORE_ASSERTS ON CACHE BOOL "" FORCE)
|
set(DYNARMIC_IGNORE_ASSERTS ON CACHE BOOL "" FORCE)
|
||||||
add_subdirectory(dynarmic)
|
add_subdirectory(dynarmic EXCLUDE_FROM_ALL)
|
||||||
|
add_library(dynarmic::dynarmic ALIAS dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# getopt
|
# getopt
|
||||||
|
@ -26,7 +27,9 @@ endif()
|
||||||
add_subdirectory(glad)
|
add_subdirectory(glad)
|
||||||
|
|
||||||
# inih
|
# inih
|
||||||
add_subdirectory(inih)
|
if (NOT TARGET inih::INIReader)
|
||||||
|
add_subdirectory(inih)
|
||||||
|
endif()
|
||||||
|
|
||||||
# mbedtls
|
# mbedtls
|
||||||
add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
|
add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
|
||||||
|
@ -72,25 +75,30 @@ if (YUZU_USE_EXTERNAL_SDL2)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# ENet
|
# ENet
|
||||||
add_subdirectory(enet)
|
if (NOT TARGET enet::enet)
|
||||||
target_include_directories(enet INTERFACE ./enet/include)
|
add_subdirectory(enet EXCLUDE_FROM_ALL)
|
||||||
|
target_include_directories(enet INTERFACE ./enet/include)
|
||||||
|
add_library(enet::enet ALIAS enet)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Cubeb
|
# Cubeb
|
||||||
if(ENABLE_CUBEB)
|
if (ENABLE_CUBEB AND NOT TARGET cubeb::cubeb)
|
||||||
set(BUILD_TESTS OFF CACHE BOOL "")
|
set(BUILD_TESTS OFF CACHE BOOL "")
|
||||||
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
|
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
|
||||||
|
add_library(cubeb::cubeb ALIAS cubeb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# DiscordRPC
|
# DiscordRPC
|
||||||
if (USE_DISCORD_PRESENCE)
|
if (USE_DISCORD_PRESENCE AND NOT TARGET DiscordRPC::discord-rpc)
|
||||||
add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
|
add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
|
target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
|
||||||
|
add_library(DiscordRPC::discord-rpc ALIAS discord-rpc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Sirit
|
# Sirit
|
||||||
add_subdirectory(sirit)
|
add_subdirectory(sirit EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
find_package(OpenSSL 1.1)
|
find_package(OpenSSL 1.1)
|
||||||
if (OPENSSL_FOUND)
|
if (OPENSSL_FOUND)
|
||||||
|
@ -118,18 +126,20 @@ if (ENABLE_WEB_SERVICE)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(httplib INTERFACE crypt32 cryptui ws2_32)
|
target_link_libraries(httplib INTERFACE crypt32 cryptui ws2_32)
|
||||||
endif()
|
endif()
|
||||||
|
add_library(httplib::httplib ALIAS httplib)
|
||||||
# cpp-jwt
|
endif()
|
||||||
|
|
||||||
|
# cpp-jwt
|
||||||
|
if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt)
|
||||||
add_library(cpp-jwt INTERFACE)
|
add_library(cpp-jwt INTERFACE)
|
||||||
target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include)
|
target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include)
|
||||||
target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
|
target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
|
||||||
|
add_library(cpp-jwt::cpp-jwt ALIAS cpp-jwt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Opus
|
# Opus
|
||||||
if (YUZU_USE_BUNDLED_OPUS)
|
if (NOT TARGET Opus::opus)
|
||||||
add_subdirectory(opus EXCLUDE_FROM_ALL)
|
add_subdirectory(opus EXCLUDE_FROM_ALL)
|
||||||
else()
|
|
||||||
find_package(Opus 1.3 REQUIRED)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# FFMpeg
|
# FFMpeg
|
||||||
|
@ -140,3 +150,8 @@ if (YUZU_USE_BUNDLED_FFMPEG)
|
||||||
set(FFmpeg_LIBRARIES "${FFmpeg_LIBRARIES}" PARENT_SCOPE)
|
set(FFmpeg_LIBRARIES "${FFmpeg_LIBRARIES}" PARENT_SCOPE)
|
||||||
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Vulkan-Headers
|
||||||
|
if (NOT TARGET Vulkan::Headers)
|
||||||
|
add_subdirectory(Vulkan-Headers EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 Alexandre Bouvier <contact@amb.tf>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
find_path(DiscordRPC_INCLUDE_DIR discord_rpc.h)
|
||||||
|
|
||||||
|
find_library(DiscordRPC_LIBRARY discord-rpc)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(DiscordRPC
|
||||||
|
REQUIRED_VARS
|
||||||
|
DiscordRPC_LIBRARY
|
||||||
|
DiscordRPC_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if (DiscordRPC_FOUND AND NOT TARGET DiscordRPC::discord-rpc)
|
||||||
|
add_library(DiscordRPC::discord-rpc UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(DiscordRPC::discord-rpc PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${DiscordRPC_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${DiscordRPC_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
DiscordRPC_INCLUDE_DIR
|
||||||
|
DiscordRPC_LIBRARY
|
||||||
|
)
|
|
@ -0,0 +1,17 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 Alexandre Bouvier <contact@amb.tf>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(ENET QUIET IMPORTED_TARGET GLOBAL libenet)
|
||||||
|
if (ENET_FOUND)
|
||||||
|
add_library(enet::enet ALIAS PkgConfig::ENET)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(enet
|
||||||
|
REQUIRED_VARS ENET_LINK_LIBRARIES
|
||||||
|
VERSION_VAR ENET_VERSION
|
||||||
|
)
|
|
@ -0,0 +1,22 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package(httplib QUIET CONFIG)
|
||||||
|
if (httplib_FOUND)
|
||||||
|
find_package_handle_standard_args(httplib CONFIG_MODE)
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(HTTPLIB QUIET IMPORTED_TARGET GLOBAL cpp-httplib)
|
||||||
|
if (HTTPLIB_FOUND)
|
||||||
|
add_library(httplib::httplib ALIAS PkgConfig::HTTPLIB)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
find_package_handle_standard_args(httplib
|
||||||
|
REQUIRED_VARS HTTPLIB_INCLUDEDIR
|
||||||
|
VERSION_VAR HTTPLIB_VERSION
|
||||||
|
)
|
||||||
|
endif()
|
|
@ -0,0 +1,17 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 Alexandre Bouvier <contact@amb.tf>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(INIREADER QUIET IMPORTED_TARGET GLOBAL INIReader)
|
||||||
|
if (INIREADER_FOUND)
|
||||||
|
add_library(inih::INIReader ALIAS PkgConfig::INIREADER)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(inih
|
||||||
|
REQUIRED_VARS INIREADER_LINK_LIBRARIES
|
||||||
|
VERSION_VAR INIREADER_VERSION
|
||||||
|
)
|
|
@ -1,19 +1,30 @@
|
||||||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
find_package(PkgConfig)
|
|
||||||
|
|
||||||
if (PKG_CONFIG_FOUND)
|
|
||||||
pkg_search_module(liblz4 IMPORTED_TARGET GLOBAL liblz4)
|
|
||||||
if (liblz4_FOUND)
|
|
||||||
add_library(lz4::lz4 ALIAS PkgConfig::liblz4)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(lz4
|
|
||||||
REQUIRED_VARS
|
find_package(lz4 QUIET CONFIG)
|
||||||
liblz4_LINK_LIBRARIES
|
if (lz4_FOUND)
|
||||||
liblz4_FOUND
|
find_package_handle_standard_args(lz4 CONFIG_MODE)
|
||||||
VERSION_VAR liblz4_VERSION
|
if (NOT TARGET lz4::lz4)
|
||||||
)
|
if (TARGET LZ4::lz4_shared)
|
||||||
|
set_target_properties(LZ4::lz4_shared PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
|
add_library(lz4::lz4 ALIAS LZ4::lz4_shared)
|
||||||
|
else()
|
||||||
|
set_target_properties(LZ4::lz4_static PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
|
add_library(lz4::lz4 ALIAS LZ4::lz4_static)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(liblz4 QUIET IMPORTED_TARGET GLOBAL liblz4)
|
||||||
|
if (liblz4_FOUND)
|
||||||
|
add_library(lz4::lz4 ALIAS PkgConfig::liblz4)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
find_package_handle_standard_args(lz4
|
||||||
|
REQUIRED_VARS liblz4_LINK_LIBRARIES
|
||||||
|
VERSION_VAR liblz4_VERSION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
|
@ -1,19 +1,30 @@
|
||||||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
find_package(PkgConfig)
|
|
||||||
|
|
||||||
if (PKG_CONFIG_FOUND)
|
|
||||||
pkg_search_module(libzstd IMPORTED_TARGET GLOBAL libzstd)
|
|
||||||
if (libzstd_FOUND)
|
|
||||||
add_library(zstd::zstd ALIAS PkgConfig::libzstd)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(zstd
|
|
||||||
REQUIRED_VARS
|
find_package(zstd QUIET CONFIG)
|
||||||
libzstd_LINK_LIBRARIES
|
if (zstd_FOUND)
|
||||||
libzstd_FOUND
|
find_package_handle_standard_args(zstd CONFIG_MODE)
|
||||||
VERSION_VAR libzstd_VERSION
|
if (NOT TARGET zstd::zstd)
|
||||||
)
|
if (TARGET zstd::libzstd_shared)
|
||||||
|
set_target_properties(zstd::libzstd_shared PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
|
add_library(zstd::zstd ALIAS zstd::libzstd_shared)
|
||||||
|
else()
|
||||||
|
set_target_properties(zstd::libzstd_static PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
|
add_library(zstd::zstd ALIAS zstd::libzstd_static)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(libzstd QUIET IMPORTED_TARGET GLOBAL libzstd)
|
||||||
|
if (libzstd_FOUND)
|
||||||
|
add_library(zstd::zstd ALIAS PkgConfig::libzstd)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
find_package_handle_standard_args(zstd
|
||||||
|
REQUIRED_VARS libzstd_LINK_LIBRARIES
|
||||||
|
VERSION_VAR libzstd_VERSION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
|
@ -9,4 +9,5 @@ add_library(inih
|
||||||
)
|
)
|
||||||
|
|
||||||
create_target_directory_groups(inih)
|
create_target_directory_groups(inih)
|
||||||
target_include_directories(inih INTERFACE .)
|
target_include_directories(inih INTERFACE inih/cpp)
|
||||||
|
add_library(inih::INIReader ALIAS inih)
|
||||||
|
|
|
@ -219,11 +219,11 @@ endif()
|
||||||
|
|
||||||
target_link_libraries(audio_core PUBLIC common core)
|
target_link_libraries(audio_core PUBLIC common core)
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
target_link_libraries(audio_core PRIVATE dynarmic)
|
target_link_libraries(audio_core PRIVATE dynarmic::dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUBEB)
|
if(ENABLE_CUBEB)
|
||||||
target_link_libraries(audio_core PRIVATE cubeb)
|
target_link_libraries(audio_core PRIVATE cubeb::cubeb)
|
||||||
target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
|
target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
|
||||||
endif()
|
endif()
|
||||||
if(ENABLE_SDL2)
|
if(ENABLE_SDL2)
|
||||||
|
|
|
@ -149,7 +149,7 @@ if(ARCHITECTURE_x86_64)
|
||||||
x64/xbyak_abi.h
|
x64/xbyak_abi.h
|
||||||
x64/xbyak_util.h
|
x64/xbyak_util.h
|
||||||
)
|
)
|
||||||
target_link_libraries(common PRIVATE xbyak)
|
target_link_libraries(common PRIVATE xbyak::xbyak)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
@ -174,17 +174,7 @@ endif()
|
||||||
create_target_directory_groups(common)
|
create_target_directory_groups(common)
|
||||||
|
|
||||||
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads)
|
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads)
|
||||||
if (TARGET lz4::lz4)
|
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd)
|
||||||
target_link_libraries(common PRIVATE lz4::lz4)
|
|
||||||
else()
|
|
||||||
target_link_libraries(common PRIVATE LZ4::lz4_shared)
|
|
||||||
endif()
|
|
||||||
if (TARGET zstd::zstd)
|
|
||||||
target_link_libraries(common PRIVATE zstd::zstd)
|
|
||||||
else()
|
|
||||||
target_link_libraries(common PRIVATE
|
|
||||||
$<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||||
target_precompile_headers(common PRIVATE precompiled_headers.h)
|
target_precompile_headers(common PRIVATE precompiled_headers.h)
|
||||||
|
|
|
@ -824,7 +824,7 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
hle/service/jit/jit.cpp
|
hle/service/jit/jit.cpp
|
||||||
hle/service/jit/jit.h
|
hle/service/jit/jit.h
|
||||||
)
|
)
|
||||||
target_link_libraries(core PRIVATE dynarmic)
|
target_link_libraries(core PRIVATE dynarmic::dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||||
|
|
|
@ -19,7 +19,7 @@ add_library(network STATIC
|
||||||
|
|
||||||
create_target_directory_groups(network)
|
create_target_directory_groups(network)
|
||||||
|
|
||||||
target_link_libraries(network PRIVATE common enet Boost::boost)
|
target_link_libraries(network PRIVATE common enet::enet Boost::boost)
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE)
|
||||||
target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE)
|
target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE)
|
||||||
target_link_libraries(network PRIVATE web_service)
|
target_link_libraries(network PRIVATE web_service)
|
||||||
|
|
|
@ -264,8 +264,7 @@ target_link_options(video_core PRIVATE ${FFmpeg_LDFLAGS})
|
||||||
|
|
||||||
add_dependencies(video_core host_shaders)
|
add_dependencies(video_core host_shaders)
|
||||||
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
||||||
target_include_directories(video_core PRIVATE sirit ../../externals/Vulkan-Headers/include)
|
target_link_libraries(video_core PRIVATE sirit Vulkan::Headers)
|
||||||
target_link_libraries(video_core PRIVATE sirit)
|
|
||||||
|
|
||||||
if (ENABLE_NSIGHT_AFTERMATH)
|
if (ENABLE_NSIGHT_AFTERMATH)
|
||||||
if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
|
if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
|
||||||
|
@ -305,11 +304,11 @@ if (ARCHITECTURE_x86_64)
|
||||||
macro/macro_jit_x64.cpp
|
macro/macro_jit_x64.cpp
|
||||||
macro/macro_jit_x64.h
|
macro/macro_jit_x64.h
|
||||||
)
|
)
|
||||||
target_link_libraries(video_core PUBLIC xbyak)
|
target_link_libraries(video_core PUBLIC xbyak::xbyak)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
target_link_libraries(video_core PRIVATE dynarmic)
|
target_link_libraries(video_core PRIVATE dynarmic::dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||||
|
|
|
@ -17,7 +17,7 @@ add_library(web_service STATIC
|
||||||
)
|
)
|
||||||
|
|
||||||
create_target_directory_groups(web_service)
|
create_target_directory_groups(web_service)
|
||||||
target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib cpp-jwt)
|
target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt)
|
||||||
|
|
||||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||||
target_precompile_headers(web_service PRIVATE precompiled_headers.h)
|
target_precompile_headers(web_service PRIVATE precompiled_headers.h)
|
||||||
|
|
|
@ -318,7 +318,7 @@ target_link_libraries(yuzu PRIVATE common core input_common network video_core)
|
||||||
target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets)
|
target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets)
|
||||||
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
|
|
||||||
target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include)
|
target_link_libraries(yuzu PRIVATE Vulkan::Headers)
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
@ -354,7 +354,7 @@ if (USE_DISCORD_PRESENCE)
|
||||||
discord_impl.cpp
|
discord_impl.cpp
|
||||||
discord_impl.h
|
discord_impl.h
|
||||||
)
|
)
|
||||||
target_link_libraries(yuzu PRIVATE discord-rpc)
|
target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc)
|
||||||
target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE)
|
target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ if (NOT APPLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
target_link_libraries(yuzu PRIVATE dynarmic)
|
target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||||
|
|
|
@ -34,7 +34,7 @@ add_executable(yuzu-cmd
|
||||||
create_target_directory_groups(yuzu-cmd)
|
create_target_directory_groups(yuzu-cmd)
|
||||||
|
|
||||||
target_link_libraries(yuzu-cmd PRIVATE common core input_common)
|
target_link_libraries(yuzu-cmd PRIVATE common core input_common)
|
||||||
target_link_libraries(yuzu-cmd PRIVATE inih glad)
|
target_link_libraries(yuzu-cmd PRIVATE inih::INIReader glad)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(yuzu-cmd PRIVATE getopt)
|
target_link_libraries(yuzu-cmd PRIVATE getopt)
|
||||||
endif()
|
endif()
|
||||||
|
@ -43,7 +43,7 @@ target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon")
|
create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon")
|
||||||
target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR})
|
target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR})
|
||||||
|
|
||||||
target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include)
|
target_link_libraries(yuzu-cmd PRIVATE Vulkan::Headers)
|
||||||
|
|
||||||
if (YUZU_USE_EXTERNAL_SDL2)
|
if (YUZU_USE_EXTERNAL_SDL2)
|
||||||
target_link_libraries(yuzu-cmd PRIVATE SDL2-static)
|
target_link_libraries(yuzu-cmd PRIVATE SDL2-static)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <inih/cpp/INIReader.h>
|
#include <INIReader.h>
|
||||||
#include "common/fs/file.h"
|
#include "common/fs/file.h"
|
||||||
#include "common/fs/fs.h"
|
#include "common/fs/fs.h"
|
||||||
#include "common/fs/path_util.h"
|
#include "common/fs/path_util.h"
|
||||||
|
|
Loading…
Reference in New Issue