pineapple/externals/dynarmic/externals/CMakeLists.txt

63 lines
1.7 KiB
Text
Raw Normal View History

2022-02-01 16:36:57 +01:00
# Always build externals as static libraries, even when dynarmic is built as shared
2022-06-22 03:30:11 +02:00
if (BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
2022-02-01 16:36:57 +01:00
2020-12-28 16:15:37 +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.
# catch
2021-10-12 22:47:55 +02:00
if (DYNARMIC_TESTS AND NOT TARGET catch)
add_library(catch INTERFACE)
target_include_directories(catch INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/catch/include>)
endif()
2020-12-28 16:15:37 +01:00
# fmt
2021-10-12 22:47:55 +02:00
if (NOT TARGET fmt AND NOT TARGET fmt::fmt)
2020-12-28 16:15:37 +01:00
# fmtlib formatting library
add_subdirectory(fmt)
endif()
2022-04-20 01:28:43 +02:00
# mcl
2020-12-28 16:15:37 +01:00
2022-04-20 01:28:43 +02:00
if (NOT TARGET merry::mcl)
add_subdirectory(mcl)
endif()
2020-12-28 16:15:37 +01:00
# robin-map
2021-10-12 22:47:55 +02:00
if (NOT TARGET tsl::robin_map)
2021-12-31 09:50:27 +01:00
add_subdirectory(robin-map)
2021-10-12 22:47:55 +02:00
endif()
2020-12-28 16:15:37 +01:00
2021-03-08 07:51:31 +01:00
# vixl
2022-02-26 21:58:02 +01:00
if (ARCHITECTURE STREQUAL "arm64" AND NOT TARGET vixl)
2021-06-06 02:35:33 +02:00
add_subdirectory(vixl EXCLUDE_FROM_ALL)
2021-03-08 07:51:31 +01:00
endif()
2020-12-28 16:15:37 +01:00
# xbyak
if (NOT TARGET xbyak)
2021-03-08 07:51:31 +01:00
if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
2020-12-28 16:15:37 +01:00
add_library(xbyak INTERFACE)
2021-08-16 13:42:12 +02:00
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/xbyak/include)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/xbyak/include)
target_include_directories(xbyak SYSTEM INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/xbyak/include)
2020-12-28 16:15:37 +01:00
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
endif()
endif()
2021-05-30 08:36:49 +02:00
# zydis
2021-10-12 22:47:55 +02:00
if (NOT TARGET Zydis)
option(ZYDIS_BUILD_TOOLS "" OFF)
option(ZYDIS_BUILD_EXAMPLES "" OFF)
set(ZYDIS_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
add_subdirectory(zydis EXCLUDE_FROM_ALL)
endif()