cmake: prefer system oaknut
This commit is contained in:
parent
2ee3eacd01
commit
1e1ba4e0c2
3 changed files with 19 additions and 10 deletions
|
@ -133,28 +133,33 @@ if (DYNARMIC_USE_BUNDLED_EXTERNALS)
|
||||||
set(CMAKE_DISABLE_FIND_PACKAGE_Catch2 ON)
|
set(CMAKE_DISABLE_FIND_PACKAGE_Catch2 ON)
|
||||||
set(CMAKE_DISABLE_FIND_PACKAGE_fmt ON)
|
set(CMAKE_DISABLE_FIND_PACKAGE_fmt ON)
|
||||||
set(CMAKE_DISABLE_FIND_PACKAGE_mcl ON)
|
set(CMAKE_DISABLE_FIND_PACKAGE_mcl ON)
|
||||||
|
set(CMAKE_DISABLE_FIND_PACKAGE_oaknut ON)
|
||||||
set(CMAKE_DISABLE_FIND_PACKAGE_tsl-robin-map ON)
|
set(CMAKE_DISABLE_FIND_PACKAGE_tsl-robin-map ON)
|
||||||
set(CMAKE_DISABLE_FIND_PACKAGE_xbyak ON)
|
set(CMAKE_DISABLE_FIND_PACKAGE_xbyak ON)
|
||||||
set(CMAKE_DISABLE_FIND_PACKAGE_Zydis ON)
|
set(CMAKE_DISABLE_FIND_PACKAGE_Zydis ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost 1.57 REQUIRED)
|
find_package(Boost 1.57 REQUIRED)
|
||||||
find_package(fmt 9 QUIET)
|
find_package(fmt 9 CONFIG)
|
||||||
find_package(mcl 0.1.12 EXACT QUIET)
|
find_package(mcl 0.1.12 EXACT CONFIG)
|
||||||
find_package(tsl-robin-map QUIET)
|
find_package(tsl-robin-map CONFIG)
|
||||||
|
|
||||||
|
if ("arm64" IN_LIST ARCHITECTURE OR DYNARMIC_TESTS)
|
||||||
|
find_package(oaknut 2.0.1 CONFIG)
|
||||||
|
endif()
|
||||||
|
|
||||||
if ("x86_64" IN_LIST ARCHITECTURE)
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
||||||
find_package(xbyak 6 QUIET)
|
find_package(xbyak 6 CONFIG)
|
||||||
find_package(Zydis 4 QUIET)
|
find_package(Zydis 4 CONFIG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DYNARMIC_USE_LLVM)
|
if (DYNARMIC_USE_LLVM)
|
||||||
find_package(LLVM REQUIRED CONFIG)
|
find_package(LLVM REQUIRED)
|
||||||
separate_arguments(LLVM_DEFINITIONS)
|
separate_arguments(LLVM_DEFINITIONS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DYNARMIC_TESTS)
|
if (DYNARMIC_TESTS)
|
||||||
find_package(Catch2 3 QUIET)
|
find_package(Catch2 3 CONFIG)
|
||||||
if (DYNARMIC_TESTS_USE_UNICORN)
|
if (DYNARMIC_TESTS_USE_UNICORN)
|
||||||
find_package(Unicorn REQUIRED)
|
find_package(Unicorn REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (NOT @BUILD_SHARED_LIBS@)
|
||||||
find_dependency(tsl-robin-map)
|
find_dependency(tsl-robin-map)
|
||||||
|
|
||||||
if ("arm64" IN_LIST ARCHITECTURE)
|
if ("arm64" IN_LIST ARCHITECTURE)
|
||||||
find_dependency(oaknut)
|
find_dependency(oaknut 2.0.1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ("x86_64" IN_LIST ARCHITECTURE)
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
||||||
|
@ -20,7 +20,7 @@ if (NOT @BUILD_SHARED_LIBS@)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (@DYNARMIC_USE_LLVM@)
|
if (@DYNARMIC_USE_LLVM@)
|
||||||
find_dependency(LLVM CONFIG)
|
find_dependency(LLVM)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
4
externals/CMakeLists.txt
vendored
4
externals/CMakeLists.txt
vendored
|
@ -41,7 +41,11 @@ endif()
|
||||||
# oaknut
|
# oaknut
|
||||||
|
|
||||||
if (NOT TARGET merry::oaknut)
|
if (NOT TARGET merry::oaknut)
|
||||||
|
if ("arm64" IN_LIST ARCHITECTURE)
|
||||||
add_subdirectory(oaknut)
|
add_subdirectory(oaknut)
|
||||||
|
elseif (DYNARMIC_TESTS)
|
||||||
|
add_subdirectory(oaknut EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# robin-map
|
# robin-map
|
||||||
|
|
Loading…
Reference in a new issue