summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2022-12-05 12:26:09 -0500
committerGravatar GitHub2022-12-05 12:26:09 -0500
commit3b19f741bd6a19f603858e6cdf8db41516c7075f (patch)
treeb81c29eed062f83a3f01161710b00d5d531e666b /src
parentMerge pull request #9383 from FernandoS27/poke-great (diff)
parentcmake: prefer system libraries (diff)
downloadyuzu-3b19f741bd6a19f603858e6cdf8db41516c7075f.tar.gz
yuzu-3b19f741bd6a19f603858e6cdf8db41516c7075f.tar.xz
yuzu-3b19f741bd6a19f603858e6cdf8db41516c7075f.zip
Merge pull request #6833 from abouvier/unbundle
cmake: prefer system libraries
Diffstat (limited to 'src')
-rw-r--r--src/audio_core/CMakeLists.txt4
-rw-r--r--src/common/CMakeLists.txt14
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/network/CMakeLists.txt2
-rw-r--r--src/video_core/CMakeLists.txt7
-rw-r--r--src/web_service/CMakeLists.txt2
-rw-r--r--src/yuzu/CMakeLists.txt6
-rw-r--r--src/yuzu_cmd/CMakeLists.txt4
-rw-r--r--src/yuzu_cmd/config.cpp2
9 files changed, 16 insertions, 27 deletions
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt
index 0a9d9ec29..f573a23e6 100644
--- a/src/audio_core/CMakeLists.txt
+++ b/src/audio_core/CMakeLists.txt
@@ -219,11 +219,11 @@ endif()
219 219
220target_link_libraries(audio_core PUBLIC common core) 220target_link_libraries(audio_core PUBLIC common core)
221if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) 221if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
222 target_link_libraries(audio_core PRIVATE dynarmic) 222 target_link_libraries(audio_core PRIVATE dynarmic::dynarmic)
223endif() 223endif()
224 224
225if(ENABLE_CUBEB) 225if(ENABLE_CUBEB)
226 target_link_libraries(audio_core PRIVATE cubeb) 226 target_link_libraries(audio_core PRIVATE cubeb::cubeb)
227 target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1) 227 target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
228endif() 228endif()
229if(ENABLE_SDL2) 229if(ENABLE_SDL2)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index a12edc584..6bdffcb7a 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -149,7 +149,7 @@ if(ARCHITECTURE_x86_64)
149 x64/xbyak_abi.h 149 x64/xbyak_abi.h
150 x64/xbyak_util.h 150 x64/xbyak_util.h
151 ) 151 )
152 target_link_libraries(common PRIVATE xbyak) 152 target_link_libraries(common PRIVATE xbyak::xbyak)
153endif() 153endif()
154 154
155if (MSVC) 155if (MSVC)
@@ -174,17 +174,7 @@ endif()
174create_target_directory_groups(common) 174create_target_directory_groups(common)
175 175
176target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) 176target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads)
177if (TARGET lz4::lz4) 177target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd)
178 target_link_libraries(common PRIVATE lz4::lz4)
179else()
180 target_link_libraries(common PRIVATE LZ4::lz4_shared)
181endif()
182if (TARGET zstd::zstd)
183 target_link_libraries(common PRIVATE zstd::zstd)
184else()
185 target_link_libraries(common PRIVATE
186 $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
187endif()
188 178
189if (YUZU_USE_PRECOMPILED_HEADERS) 179if (YUZU_USE_PRECOMPILED_HEADERS)
190 target_precompile_headers(common PRIVATE precompiled_headers.h) 180 target_precompile_headers(common PRIVATE precompiled_headers.h)
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 6530d3c60..ad8b8ef95 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -824,7 +824,7 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
824 hle/service/jit/jit.cpp 824 hle/service/jit/jit.cpp
825 hle/service/jit/jit.h 825 hle/service/jit/jit.h
826 ) 826 )
827 target_link_libraries(core PRIVATE dynarmic) 827 target_link_libraries(core PRIVATE dynarmic::dynarmic)
828endif() 828endif()
829 829
830if (YUZU_USE_PRECOMPILED_HEADERS) 830if (YUZU_USE_PRECOMPILED_HEADERS)
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
index c85c308de..1ab52da59 100644
--- a/src/network/CMakeLists.txt
+++ b/src/network/CMakeLists.txt
@@ -19,7 +19,7 @@ add_library(network STATIC
19 19
20create_target_directory_groups(network) 20create_target_directory_groups(network)
21 21
22target_link_libraries(network PRIVATE common enet Boost::boost) 22target_link_libraries(network PRIVATE common enet::enet Boost::boost)
23if (ENABLE_WEB_SERVICE) 23if (ENABLE_WEB_SERVICE)
24 target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE) 24 target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE)
25 target_link_libraries(network PRIVATE web_service) 25 target_link_libraries(network PRIVATE web_service)
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index b9bad63ac..5096d935e 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -264,8 +264,7 @@ target_link_options(video_core PRIVATE ${FFmpeg_LDFLAGS})
264 264
265add_dependencies(video_core host_shaders) 265add_dependencies(video_core host_shaders)
266target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE}) 266target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
267target_include_directories(video_core PRIVATE sirit ../../externals/Vulkan-Headers/include) 267target_link_libraries(video_core PRIVATE sirit Vulkan::Headers)
268target_link_libraries(video_core PRIVATE sirit)
269 268
270if (ENABLE_NSIGHT_AFTERMATH) 269if (ENABLE_NSIGHT_AFTERMATH)
271 if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK}) 270 if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
@@ -305,11 +304,11 @@ if (ARCHITECTURE_x86_64)
305 macro/macro_jit_x64.cpp 304 macro/macro_jit_x64.cpp
306 macro/macro_jit_x64.h 305 macro/macro_jit_x64.h
307 ) 306 )
308 target_link_libraries(video_core PUBLIC xbyak) 307 target_link_libraries(video_core PUBLIC xbyak::xbyak)
309endif() 308endif()
310 309
311if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) 310if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
312 target_link_libraries(video_core PRIVATE dynarmic) 311 target_link_libraries(video_core PRIVATE dynarmic::dynarmic)
313endif() 312endif()
314 313
315if (YUZU_USE_PRECOMPILED_HEADERS) 314if (YUZU_USE_PRECOMPILED_HEADERS)
diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt
index 19534b9e4..02582aa04 100644
--- a/src/web_service/CMakeLists.txt
+++ b/src/web_service/CMakeLists.txt
@@ -17,7 +17,7 @@ add_library(web_service STATIC
17) 17)
18 18
19create_target_directory_groups(web_service) 19create_target_directory_groups(web_service)
20target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib cpp-jwt) 20target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt)
21 21
22if (YUZU_USE_PRECOMPILED_HEADERS) 22if (YUZU_USE_PRECOMPILED_HEADERS)
23 target_precompile_headers(web_service PRIVATE precompiled_headers.h) 23 target_precompile_headers(web_service PRIVATE precompiled_headers.h)
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index f192d6329..9971bdfab 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -318,7 +318,7 @@ target_link_libraries(yuzu PRIVATE common core input_common network video_core)
318target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets) 318target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets)
319target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) 319target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
320 320
321target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include) 321target_link_libraries(yuzu PRIVATE Vulkan::Headers)
322if (NOT WIN32) 322if (NOT WIN32)
323 target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}) 323 target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
324endif() 324endif()
@@ -354,7 +354,7 @@ if (USE_DISCORD_PRESENCE)
354 discord_impl.cpp 354 discord_impl.cpp
355 discord_impl.h 355 discord_impl.h
356 ) 356 )
357 target_link_libraries(yuzu PRIVATE discord-rpc) 357 target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc)
358 target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE) 358 target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE)
359endif() 359endif()
360 360
@@ -411,7 +411,7 @@ if (NOT APPLE)
411endif() 411endif()
412 412
413if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) 413if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
414 target_link_libraries(yuzu PRIVATE dynarmic) 414 target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
415endif() 415endif()
416 416
417if (YUZU_USE_PRECOMPILED_HEADERS) 417if (YUZU_USE_PRECOMPILED_HEADERS)
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt
index 1c0c1a9fe..19b1d258c 100644
--- a/src/yuzu_cmd/CMakeLists.txt
+++ b/src/yuzu_cmd/CMakeLists.txt
@@ -34,7 +34,7 @@ add_executable(yuzu-cmd
34create_target_directory_groups(yuzu-cmd) 34create_target_directory_groups(yuzu-cmd)
35 35
36target_link_libraries(yuzu-cmd PRIVATE common core input_common) 36target_link_libraries(yuzu-cmd PRIVATE common core input_common)
37target_link_libraries(yuzu-cmd PRIVATE inih glad) 37target_link_libraries(yuzu-cmd PRIVATE inih::INIReader glad)
38if (MSVC) 38if (MSVC)
39 target_link_libraries(yuzu-cmd PRIVATE getopt) 39 target_link_libraries(yuzu-cmd PRIVATE getopt)
40endif() 40endif()
@@ -43,7 +43,7 @@ target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
43create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon") 43create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon")
44target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR}) 44target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR})
45 45
46target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include) 46target_link_libraries(yuzu-cmd PRIVATE Vulkan::Headers)
47 47
48if (YUZU_USE_EXTERNAL_SDL2) 48if (YUZU_USE_EXTERNAL_SDL2)
49 target_link_libraries(yuzu-cmd PRIVATE SDL2-static) 49 target_link_libraries(yuzu-cmd PRIVATE SDL2-static)
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 59f9c8e09..2c78e776c 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -15,7 +15,7 @@
15#pragma clang diagnostic pop 15#pragma clang diagnostic pop
16#endif 16#endif
17 17
18#include <inih/cpp/INIReader.h> 18#include <INIReader.h>
19#include "common/fs/file.h" 19#include "common/fs/file.h"
20#include "common/fs/fs.h" 20#include "common/fs/fs.h"
21#include "common/fs/path_util.h" 21#include "common/fs/path_util.h"