diff options
author | lat9nq <lat9nq@gmail.com> | 2022-07-25 19:02:09 +0200 |
---|---|---|
committer | lat9nq <lat9nq@gmail.com> | 2022-07-28 22:01:47 +0200 |
commit | dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d (patch) | |
tree | eadbf859946e21504fd3493ec804d4f8f53e2201 /CMakeLists.txt | |
parent | Merge pull request #8349 from yuzu-emu/revert-8256-ci-vs-2022 (diff) | |
download | yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.tar yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.tar.gz yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.tar.bz2 yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.tar.lz yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.tar.xz yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.tar.zst yuzu-dfc6dd0a2d4ccb84767987d1f316ce57c19ff62d.zip |
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d35ccb696..5f508d61a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,9 +38,13 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON) option(YUZU_TESTS "Compile tests" ON) -option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" OFF) +option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}") if (YUZU_USE_BUNDLED_VCPKG) + if (YUZU_TESTS) + list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests") + endif() + include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake) elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") # Disable manifest mode (use vcpkg classic mode) when using a custom vcpkg installation @@ -160,7 +164,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) # ======================================================================= find_package(fmt 8.0.1 REQUIRED CONFIG) -find_package(lz4 1.8 REQUIRED) find_package(nlohmann_json 3.8 REQUIRED CONFIG) find_package(ZLIB 1.2 REQUIRED) @@ -170,6 +173,12 @@ if (NOT zstd_FOUND) find_package(zstd 1.5 REQUIRED) endif() +# lz4 1.8 is required, but vcpkg's lz4-config.cmake does not have version info +find_package(lz4 CONFIG) +if (NOT lz4_FOUND) + find_package(lz4 1.8 REQUIRED) +endif() + if (YUZU_TESTS) find_package(Catch2 2.13.7 REQUIRED CONFIG) endif() @@ -355,16 +364,10 @@ if (ENABLE_SDL2) endif() endif() -# TODO(lat9nq): Determine what if any of this we still need -# -# Reexport some targets that are named differently when using the upstream CmakeConfig vs the generated Conan config +# Reexport some targets that are named differently when using the upstream CmakeConfig # In order to ALIAS targets to a new name, they first need to be IMPORTED_GLOBAL # Dynarmic checks for target `boost` and so we want to make sure it can find it through our system instead of using their external -if (TARGET Boost::Boost) - set_target_properties(Boost::Boost PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(Boost::boost ALIAS Boost::Boost) - add_library(boost ALIAS Boost::Boost) -elseif (TARGET Boost::boost) +if (TARGET Boost::boost) set_target_properties(Boost::boost PROPERTIES IMPORTED_GLOBAL TRUE) add_library(boost ALIAS Boost::boost) endif() |