2022-01-06 05:24:09 +01:00
|
|
|
# Always build externals as static libraries, even when dynarmic is built as shared
|
2022-04-23 19:47:35 +02:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
2023-02-27 09:16:10 +01:00
|
|
|
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
|
2022-04-23 19:47:35 +02:00
|
|
|
endif()
|
2022-01-06 05:24:09 +01:00
|
|
|
|
2022-12-31 05:18:53 +01:00
|
|
|
# Allow options shadowing with normal variables when subproject use old cmake policy
|
|
|
|
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
|
|
|
|
2022-11-24 09:09:19 +01:00
|
|
|
# Disable tests in all externals supporting the standard option name
|
|
|
|
set(BUILD_TESTING OFF)
|
|
|
|
|
2016-08-25 23:21:19 +02:00
|
|
|
# For libraries that already come with a CMakeLists file,
|
|
|
|
# simply add the directory to that file as a subdirectory
|
|
|
|
# to have CMake automatically recognize them.
|
|
|
|
|
2022-12-31 17:32:10 +01:00
|
|
|
# catch
|
|
|
|
|
|
|
|
if (NOT TARGET Catch2::Catch2WithMain)
|
|
|
|
if (DYNARMIC_TESTS)
|
|
|
|
add_subdirectory(catch EXCLUDE_FROM_ALL)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2020-05-21 22:31:18 +02:00
|
|
|
# fmt
|
|
|
|
|
2022-11-22 02:42:52 +01:00
|
|
|
if (NOT TARGET fmt::fmt)
|
2016-11-24 05:40:15 +01:00
|
|
|
# fmtlib formatting library
|
2022-12-31 05:18:53 +01:00
|
|
|
set(FMT_INSTALL ON)
|
2023-02-27 09:16:10 +01:00
|
|
|
add_subdirectory(fmt)
|
2016-11-24 05:40:15 +01:00
|
|
|
endif()
|
2016-12-12 15:23:42 +01:00
|
|
|
|
2022-04-19 13:12:19 +02:00
|
|
|
# mcl
|
2020-05-21 22:31:18 +02:00
|
|
|
|
2022-04-19 13:12:19 +02:00
|
|
|
if (NOT TARGET merry::mcl)
|
2022-12-31 05:18:53 +01:00
|
|
|
set(MCL_INSTALL ON)
|
2023-02-27 09:16:10 +01:00
|
|
|
add_subdirectory(mcl)
|
2022-04-19 13:12:19 +02:00
|
|
|
endif()
|
2020-05-21 22:31:18 +02:00
|
|
|
|
2022-07-10 10:35:44 +02:00
|
|
|
# oaknut
|
|
|
|
|
|
|
|
if (NOT TARGET merry::oaknut)
|
2023-03-31 11:26:35 +02:00
|
|
|
add_subdirectory(oaknut)
|
2022-07-10 10:35:44 +02:00
|
|
|
endif()
|
|
|
|
|
2020-05-21 22:31:18 +02:00
|
|
|
# robin-map
|
|
|
|
|
2021-08-10 16:05:38 +02:00
|
|
|
if (NOT TARGET tsl::robin_map)
|
2023-02-27 09:16:10 +01:00
|
|
|
add_subdirectory(robin-map)
|
2021-08-10 16:05:38 +02:00
|
|
|
endif()
|
2020-05-21 22:31:18 +02:00
|
|
|
|
|
|
|
# xbyak
|
|
|
|
|
2022-11-22 02:42:52 +01:00
|
|
|
if (NOT TARGET xbyak::xbyak)
|
2023-01-06 15:27:06 +01:00
|
|
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
2023-02-27 09:16:10 +01:00
|
|
|
add_subdirectory(xbyak)
|
2016-12-12 15:23:42 +01:00
|
|
|
endif()
|
|
|
|
endif()
|
2021-05-25 22:32:34 +02:00
|
|
|
|
|
|
|
# zydis
|
|
|
|
|
2022-11-22 02:42:52 +01:00
|
|
|
if (NOT TARGET Zydis::Zydis)
|
2023-01-06 15:27:06 +01:00
|
|
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
2022-12-31 05:18:53 +01:00
|
|
|
set(ZYDIS_BUILD_TOOLS OFF)
|
|
|
|
set(ZYDIS_BUILD_EXAMPLES OFF)
|
|
|
|
set(ZYDIS_BUILD_DOXYGEN OFF)
|
2022-11-24 16:36:55 +01:00
|
|
|
set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
|
2022-12-31 05:18:53 +01:00
|
|
|
set(CMAKE_DISABLE_FIND_PACKAGE_Doxygen ON)
|
2023-02-27 09:16:10 +01:00
|
|
|
add_subdirectory(zydis)
|
2022-11-22 02:42:52 +01:00
|
|
|
add_library(Zydis::Zydis ALIAS Zydis)
|
2022-11-24 16:36:55 +01:00
|
|
|
endif()
|
2021-08-24 12:28:44 +02:00
|
|
|
endif()
|