diff options
| author | 2022-12-05 12:26:09 -0500 | |
|---|---|---|
| committer | 2022-12-05 12:26:09 -0500 | |
| commit | 3b19f741bd6a19f603858e6cdf8db41516c7075f (patch) | |
| tree | b81c29eed062f83a3f01161710b00d5d531e666b /src | |
| parent | Merge pull request #9383 from FernandoS27/poke-great (diff) | |
| parent | cmake: prefer system libraries (diff) | |
| download | yuzu-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.txt | 4 | ||||
| -rw-r--r-- | src/common/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/network/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/video_core/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | src/web_service/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 |
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 | ||
| 220 | target_link_libraries(audio_core PUBLIC common core) | 220 | target_link_libraries(audio_core PUBLIC common core) |
| 221 | if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) | 221 | if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) |
| 222 | target_link_libraries(audio_core PRIVATE dynarmic) | 222 | target_link_libraries(audio_core PRIVATE dynarmic::dynarmic) |
| 223 | endif() | 223 | endif() |
| 224 | 224 | ||
| 225 | if(ENABLE_CUBEB) | 225 | if(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) |
| 228 | endif() | 228 | endif() |
| 229 | if(ENABLE_SDL2) | 229 | if(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) |
| 153 | endif() | 153 | endif() |
| 154 | 154 | ||
| 155 | if (MSVC) | 155 | if (MSVC) |
| @@ -174,17 +174,7 @@ endif() | |||
| 174 | create_target_directory_groups(common) | 174 | create_target_directory_groups(common) |
| 175 | 175 | ||
| 176 | target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) | 176 | target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) |
| 177 | if (TARGET lz4::lz4) | 177 | target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd) |
| 178 | target_link_libraries(common PRIVATE lz4::lz4) | ||
| 179 | else() | ||
| 180 | target_link_libraries(common PRIVATE LZ4::lz4_shared) | ||
| 181 | endif() | ||
| 182 | if (TARGET zstd::zstd) | ||
| 183 | target_link_libraries(common PRIVATE zstd::zstd) | ||
| 184 | else() | ||
| 185 | target_link_libraries(common PRIVATE | ||
| 186 | $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>) | ||
| 187 | endif() | ||
| 188 | 178 | ||
| 189 | if (YUZU_USE_PRECOMPILED_HEADERS) | 179 | if (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) |
| 828 | endif() | 828 | endif() |
| 829 | 829 | ||
| 830 | if (YUZU_USE_PRECOMPILED_HEADERS) | 830 | if (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 | ||
| 20 | create_target_directory_groups(network) | 20 | create_target_directory_groups(network) |
| 21 | 21 | ||
| 22 | target_link_libraries(network PRIVATE common enet Boost::boost) | 22 | target_link_libraries(network PRIVATE common enet::enet Boost::boost) |
| 23 | if (ENABLE_WEB_SERVICE) | 23 | if (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 | ||
| 265 | add_dependencies(video_core host_shaders) | 265 | add_dependencies(video_core host_shaders) |
| 266 | target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE}) | 266 | target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE}) |
| 267 | target_include_directories(video_core PRIVATE sirit ../../externals/Vulkan-Headers/include) | 267 | target_link_libraries(video_core PRIVATE sirit Vulkan::Headers) |
| 268 | target_link_libraries(video_core PRIVATE sirit) | ||
| 269 | 268 | ||
| 270 | if (ENABLE_NSIGHT_AFTERMATH) | 269 | if (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) |
| 309 | endif() | 308 | endif() |
| 310 | 309 | ||
| 311 | if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) | 310 | if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) |
| 312 | target_link_libraries(video_core PRIVATE dynarmic) | 311 | target_link_libraries(video_core PRIVATE dynarmic::dynarmic) |
| 313 | endif() | 312 | endif() |
| 314 | 313 | ||
| 315 | if (YUZU_USE_PRECOMPILED_HEADERS) | 314 | if (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 | ||
| 19 | create_target_directory_groups(web_service) | 19 | create_target_directory_groups(web_service) |
| 20 | target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib cpp-jwt) | 20 | target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt) |
| 21 | 21 | ||
| 22 | if (YUZU_USE_PRECOMPILED_HEADERS) | 22 | if (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) | |||
| 318 | target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets) | 318 | target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets) |
| 319 | target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) | 319 | target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) |
| 320 | 320 | ||
| 321 | target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include) | 321 | target_link_libraries(yuzu PRIVATE Vulkan::Headers) |
| 322 | if (NOT WIN32) | 322 | if (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}) |
| 324 | endif() | 324 | endif() |
| @@ -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) |
| 359 | endif() | 359 | endif() |
| 360 | 360 | ||
| @@ -411,7 +411,7 @@ if (NOT APPLE) | |||
| 411 | endif() | 411 | endif() |
| 412 | 412 | ||
| 413 | if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) | 413 | if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) |
| 414 | target_link_libraries(yuzu PRIVATE dynarmic) | 414 | target_link_libraries(yuzu PRIVATE dynarmic::dynarmic) |
| 415 | endif() | 415 | endif() |
| 416 | 416 | ||
| 417 | if (YUZU_USE_PRECOMPILED_HEADERS) | 417 | if (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 | |||
| 34 | create_target_directory_groups(yuzu-cmd) | 34 | create_target_directory_groups(yuzu-cmd) |
| 35 | 35 | ||
| 36 | target_link_libraries(yuzu-cmd PRIVATE common core input_common) | 36 | target_link_libraries(yuzu-cmd PRIVATE common core input_common) |
| 37 | target_link_libraries(yuzu-cmd PRIVATE inih glad) | 37 | target_link_libraries(yuzu-cmd PRIVATE inih::INIReader glad) |
| 38 | if (MSVC) | 38 | if (MSVC) |
| 39 | target_link_libraries(yuzu-cmd PRIVATE getopt) | 39 | target_link_libraries(yuzu-cmd PRIVATE getopt) |
| 40 | endif() | 40 | endif() |
| @@ -43,7 +43,7 @@ target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) | |||
| 43 | create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon") | 43 | create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon") |
| 44 | target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR}) | 44 | target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR}) |
| 45 | 45 | ||
| 46 | target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include) | 46 | target_link_libraries(yuzu-cmd PRIVATE Vulkan::Headers) |
| 47 | 47 | ||
| 48 | if (YUZU_USE_EXTERNAL_SDL2) | 48 | if (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" |