From e01a1959a39acc478d0a5d8769e47222643e2de0 Mon Sep 17 00:00:00 2001 From: Merry Date: Fri, 20 Jan 2023 22:59:34 +0000 Subject: [PATCH] CMake: Add dependencies to Config file --- CMakeModules/dynarmicConfig.cmake.in | 29 +++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CMakeModules/dynarmicConfig.cmake.in b/CMakeModules/dynarmicConfig.cmake.in index 8c9ad12a..ced1210b 100644 --- a/CMakeModules/dynarmicConfig.cmake.in +++ b/CMakeModules/dynarmicConfig.cmake.in @@ -1,5 +1,32 @@ @PACKAGE_INIT@ -include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +include(CMakeFindDependencyMacro) +set(ARCHITECTURE @ARCHITECTURE@) + +find_dependency(Boost 1.57 REQUIRED) +if (NOT @CMAKE_DISABLE_FIND_PACKAGE_fmt@) + find_dependency(fmt 9 QUIET) +endif() +if (NOT @CMAKE_DISABLE_FIND_PACKAGE_mcl@) + find_dependency(mcl 0.1.12 EXACT QUIET) +endif() +if (NOT @CMAKE_DISABLE_FIND_PACKAGE_tsl-robin-map@) + find_dependency(tsl-robin-map QUIET) +endif() + +if ("x86_64" IN_LIST ARCHITECTURE) + if (NOT @CMAKE_DISABLE_FIND_PACKAGE_xbyak@) + find_dependency(xbyak 6 QUIET) + endif() + if (NOT @CMAKE_DISABLE_FIND_PACKAGE_Zydis@) + find_dependency(Zydis 4 QUIET) + endif() +endif() + +if (@DYNARMIC_USE_LLVM@) + find_dependency(LLVM REQUIRED CONFIG) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") check_required_components(@PROJECT_NAME@)