dynarmic/externals/CMakeLists.txt

76 lines
1.7 KiB
Text
Raw Normal View History

2022-01-06 04:24:09 +00:00
# Always build externals as static libraries, even when dynarmic is built as shared
2022-04-23 18:47:35 +01:00
if (BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2023-02-27 08:16:10 +00:00
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
2022-04-23 18:47:35 +01:00
endif()
2022-01-06 04:24:09 +00:00
# Allow options shadowing with normal variables when subproject use old cmake policy
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
2022-11-24 08:09:19 +00:00
# Disable tests in all externals supporting the standard option name
set(BUILD_TESTING OFF)
2016-08-25 22:21:19 +01: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 16:32:10 +00:00
# catch
if (NOT TARGET Catch2::Catch2WithMain)
if (DYNARMIC_TESTS)
add_subdirectory(catch EXCLUDE_FROM_ALL)
endif()
endif()
# fmt
2022-11-22 01:42:52 +00:00
if (NOT TARGET fmt::fmt)
# fmtlib formatting library
set(FMT_INSTALL ON)
2023-02-27 08:16:10 +00:00
add_subdirectory(fmt)
endif()
# mcl
if (NOT TARGET merry::mcl)
set(MCL_INSTALL ON)
2023-02-27 08:16:10 +00:00
add_subdirectory(mcl)
endif()
# oaknut
if (NOT TARGET merry::oaknut)
if ("arm64" IN_LIST ARCHITECTURE)
2023-02-27 08:16:10 +00:00
add_subdirectory(oaknut)
endif()
endif()
# robin-map
if (NOT TARGET tsl::robin_map)
2023-02-27 08:16:10 +00:00
add_subdirectory(robin-map)
endif()
# xbyak
2022-11-22 01:42:52 +00:00
if (NOT TARGET xbyak::xbyak)
if ("x86_64" IN_LIST ARCHITECTURE)
2023-02-27 08:16:10 +00:00
add_subdirectory(xbyak)
endif()
endif()
2021-05-25 21:32:34 +01:00
# zydis
2022-11-22 01:42:52 +00:00
if (NOT TARGET Zydis::Zydis)
if ("x86_64" IN_LIST ARCHITECTURE)
set(ZYDIS_BUILD_TOOLS OFF)
set(ZYDIS_BUILD_EXAMPLES OFF)
set(ZYDIS_BUILD_DOXYGEN OFF)
set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
set(CMAKE_DISABLE_FIND_PACKAGE_Doxygen ON)
2023-02-27 08:16:10 +00:00
add_subdirectory(zydis)
2022-11-22 01:42:52 +00:00
add_library(Zydis::Zydis ALIAS Zydis)
endif()
2021-08-24 11:28:44 +01:00
endif()