mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-04 05:34:42 +01:00
Squashed 'externals/mcl/' content from commit a86a53843
git-subtree-dir: externals/mcl git-subtree-split: a86a53843f82e4d6ca2f2e1437824495acad2712
This commit is contained in:
commit
7eb1d05f63
70 changed files with 2902 additions and 0 deletions
17
CMakeModules/CreateTargetDirectoryGroups.cmake
Normal file
17
CMakeModules/CreateTargetDirectoryGroups.cmake
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# This function should be passed a name of an existing target. It will automatically generate
|
||||
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
||||
# one in the filesystem.
|
||||
function(create_target_directory_groups target_name)
|
||||
# Place any files that aren't in the source list in a separate group so that they don't get in
|
||||
# the way.
|
||||
source_group("Other Files" REGULAR_EXPRESSION ".")
|
||||
|
||||
get_target_property(target_sources "${target_name}" SOURCES)
|
||||
|
||||
foreach(file_name IN LISTS target_sources)
|
||||
get_filename_component(dir_name "${file_name}" PATH)
|
||||
# Group names use '\' as a separator even though the entire rest of CMake uses '/'...
|
||||
string(REPLACE "/" "\\" group_name "${dir_name}")
|
||||
source_group("${group_name}" FILES "${file_name}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
56
CMakeModules/DetectArchitecture.cmake
Normal file
56
CMakeModules/DetectArchitecture.cmake
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
include(CheckSymbolExists)
|
||||
|
||||
function(detect_architecture symbol arch)
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(CMAKE_REQUIRED_QUIET YES)
|
||||
check_symbol_exists("${symbol}" "" DETECT_ARCHITECTURE_${arch})
|
||||
unset(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
if (DETECT_ARCHITECTURE_${arch})
|
||||
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
unset(DETECT_ARCHITECTURE_${arch} CACHE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
detect_architecture("__ARM64__" arm64)
|
||||
detect_architecture("__aarch64__" arm64)
|
||||
detect_architecture("_M_ARM64" arm64)
|
||||
|
||||
detect_architecture("__arm__" arm32)
|
||||
detect_architecture("__TARGET_ARCH_ARM" arm32)
|
||||
detect_architecture("_M_ARM" arm32)
|
||||
|
||||
detect_architecture("__x86_64" x86_64)
|
||||
detect_architecture("__x86_64__" x86_64)
|
||||
detect_architecture("__amd64" x86_64)
|
||||
detect_architecture("_M_X64" x86_64)
|
||||
|
||||
detect_architecture("__i386" x86_32)
|
||||
detect_architecture("__i386__" x86_32)
|
||||
detect_architecture("_M_IX86" x86_32)
|
||||
|
||||
detect_architecture("__ia64" ia64)
|
||||
detect_architecture("__ia64__" ia64)
|
||||
detect_architecture("_M_IA64" ia64)
|
||||
|
||||
detect_architecture("__mips" mips)
|
||||
detect_architecture("__mips__" mips)
|
||||
detect_architecture("_M_MRX000" mips)
|
||||
|
||||
detect_architecture("__ppc64__" ppc64)
|
||||
detect_architecture("__powerpc64__" ppc64)
|
||||
|
||||
detect_architecture("__ppc__" ppc32)
|
||||
detect_architecture("__ppc" ppc32)
|
||||
detect_architecture("__powerpc__" ppc32)
|
||||
detect_architecture("_ARCH_COM" ppc32)
|
||||
detect_architecture("_ARCH_PWR" ppc32)
|
||||
detect_architecture("_ARCH_PPC" ppc32)
|
||||
detect_architecture("_M_MPPC" ppc32)
|
||||
detect_architecture("_M_PPC" ppc32)
|
||||
|
||||
detect_architecture("__riscv" riscv)
|
||||
|
||||
detect_architecture("__EMSCRIPTEN__" wasm)
|
||||
5
CMakeModules/mclConfig.cmake.in
Normal file
5
CMakeModules/mclConfig.cmake.in
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
|
||||
check_required_components(@PROJECT_NAME@)
|
||||
Loading…
Add table
Add a link
Reference in a new issue