dynarmic/externals/CMakeLists.txt

73 lines
1.8 KiB
CMake
Raw Normal View History

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)
endif()
2022-01-06 05:24:09 +01:00
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.
# catch
2022-11-22 02:42:52 +01:00
if (NOT TARGET Catch2::Catch2)
if (DYNARMIC_TESTS)
add_library(Catch2::Catch2 INTERFACE IMPORTED GLOBAL)
target_include_directories(Catch2::Catch2 INTERFACE catch/include)
2022-12-26 21:49:43 +01:00
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
target_link_libraries(Catch2::Catch2 INTERFACE log)
endif()
2022-11-22 02:42:52 +01:00
endif()
endif()
# fmt
2022-11-22 02:42:52 +01:00
if (NOT TARGET fmt::fmt)
# fmtlib formatting library
2022-11-22 02:42:52 +01:00
option(FMT_INSTALL "" ON)
add_subdirectory(fmt EXCLUDE_FROM_ALL)
endif()
# mcl
if (NOT TARGET merry::mcl)
2022-11-22 02:42:52 +01:00
option(MCL_INSTALL "" ON)
add_subdirectory(mcl EXCLUDE_FROM_ALL)
endif()
# oaknut
if (NOT TARGET merry::oaknut)
if (ARCHITECTURE STREQUAL "arm64")
2022-11-22 02:42:52 +01:00
add_subdirectory(oaknut EXCLUDE_FROM_ALL)
endif()
endif()
# robin-map
if (NOT TARGET tsl::robin_map)
2022-11-22 02:42:52 +01:00
add_subdirectory(robin-map EXCLUDE_FROM_ALL)
endif()
# xbyak
2022-11-22 02:42:52 +01:00
if (NOT TARGET xbyak::xbyak)
if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
2022-11-22 02:42:52 +01:00
add_subdirectory(xbyak EXCLUDE_FROM_ALL)
endif()
endif()
2021-05-25 22:32:34 +02:00
# zydis
2022-11-22 02:42:52 +01:00
if (NOT TARGET Zydis::Zydis)
if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
option(ZYDIS_BUILD_TOOLS "" OFF)
option(ZYDIS_BUILD_EXAMPLES "" OFF)
option(ZYDIS_BUILD_DOXYGEN "" OFF)
set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
add_subdirectory(zydis EXCLUDE_FROM_ALL)
2022-11-22 02:42:52 +01:00
add_library(Zydis::Zydis ALIAS Zydis)
endif()
2021-08-24 12:28:44 +02:00
endif()