mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
[cmake, tools] update CPMUtil and add support for CPMUtil bundled Qt, module updates, cleanups (#3289)
Support for bundled Qt, not through aqtinstall but rather my CI. Multimedia is implemented too, works on both Windows and Linux, though we don't actually use it so it doesn't really matter. Contains Declarative and all that so the Quick frontend will work once it becomes a thing. Some options have changed, notably w.r.t LTO and faster linker, which are now handled directly in the modules. CPMUtil also has support for custom dirs (`PackageName_CUSTOM_DIR`) now. Probably most useful for adding external fragment shaders and whatnot. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3289
This commit is contained in:
parent
ecd01e13fd
commit
89f72d286a
48 changed files with 618 additions and 929 deletions
224
externals/cmake-modules/DetectArchitecture.cmake
vendored
224
externals/cmake-modules/DetectArchitecture.cmake
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2025 crueter
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
## DetectArchitecture ##
|
||||
#[[
|
||||
|
|
@ -93,133 +93,129 @@ function(detect_architecture_symbols)
|
|||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(DetectArchitecture)
|
||||
# arches here are put in a sane default order of importance
|
||||
# notably, amd64, arm64, and riscv (in order) are BY FAR the most common
|
||||
# mips is pretty popular in embedded
|
||||
# ppc64 is pretty popular in supercomputing
|
||||
# sparc is uh
|
||||
# ia64 exists
|
||||
# the rest exist, but are probably less popular than ia64
|
||||
# arches here are put in a sane default order of importance
|
||||
# notably, amd64, arm64, and riscv (in order) are BY FAR the most common
|
||||
# mips is pretty popular in embedded
|
||||
# ppc64 is pretty popular in supercomputing
|
||||
# sparc is uh
|
||||
# ia64 exists
|
||||
# the rest exist, but are probably less popular than ia64
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH arm64
|
||||
SYMBOLS
|
||||
"__ARM64__"
|
||||
"__aarch64__"
|
||||
"_M_ARM64")
|
||||
detect_architecture_symbols(
|
||||
ARCH arm64
|
||||
SYMBOLS
|
||||
"__ARM64__"
|
||||
"__aarch64__"
|
||||
"_M_ARM64")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH x86_64
|
||||
SYMBOLS
|
||||
"__x86_64"
|
||||
"__x86_64__"
|
||||
"__amd64"
|
||||
"_M_X64"
|
||||
"_M_AMD64")
|
||||
detect_architecture_symbols(
|
||||
ARCH x86_64
|
||||
SYMBOLS
|
||||
"__x86_64"
|
||||
"__x86_64__"
|
||||
"__amd64"
|
||||
"_M_X64"
|
||||
"_M_AMD64")
|
||||
|
||||
# riscv is interesting since it generally does not define a riscv64-specific symbol
|
||||
# We can, however, check for the rv32 zcf extension which is good enough of a heuristic on GCC
|
||||
detect_architecture_symbols(
|
||||
ARCH riscv
|
||||
SYMBOLS
|
||||
"__riscv_zcf")
|
||||
# riscv is interesting since it generally does not define a riscv64-specific symbol
|
||||
# We can, however, check for the rv32 zcf extension which is good enough of a heuristic on GCC
|
||||
detect_architecture_symbols(
|
||||
ARCH riscv
|
||||
SYMBOLS
|
||||
"__riscv_zcf")
|
||||
|
||||
# if zcf doesn't exist we can safely assume it's riscv64
|
||||
detect_architecture_symbols(
|
||||
ARCH riscv64
|
||||
SYMBOLS
|
||||
"__riscv")
|
||||
# if zcf doesn't exist we can safely assume it's riscv64
|
||||
detect_architecture_symbols(
|
||||
ARCH riscv64
|
||||
SYMBOLS
|
||||
"__riscv")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH x86
|
||||
SYMBOLS
|
||||
"__i386"
|
||||
"__i386__"
|
||||
"_M_IX86")
|
||||
detect_architecture_symbols(
|
||||
ARCH x86
|
||||
SYMBOLS
|
||||
"__i386"
|
||||
"__i386__"
|
||||
"_M_IX86")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH arm
|
||||
SYMBOLS
|
||||
"__arm__"
|
||||
"__TARGET_ARCH_ARM"
|
||||
"_M_ARM")
|
||||
detect_architecture_symbols(
|
||||
ARCH arm
|
||||
SYMBOLS
|
||||
"__arm__"
|
||||
"__TARGET_ARCH_ARM"
|
||||
"_M_ARM")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH ia64
|
||||
SYMBOLS
|
||||
"__ia64"
|
||||
"__ia64__"
|
||||
"_M_IA64")
|
||||
detect_architecture_symbols(
|
||||
ARCH ia64
|
||||
SYMBOLS
|
||||
"__ia64"
|
||||
"__ia64__"
|
||||
"_M_IA64")
|
||||
|
||||
# mips is probably the least fun to detect due to microMIPS
|
||||
# Because microMIPS is such cancer I'm considering it out of scope for now
|
||||
detect_architecture_symbols(
|
||||
ARCH mips64
|
||||
SYMBOLS
|
||||
"__mips64")
|
||||
# mips is probably the least fun to detect due to microMIPS
|
||||
# Because microMIPS is such cancer I'm considering it out of scope for now
|
||||
detect_architecture_symbols(
|
||||
ARCH mips64
|
||||
SYMBOLS
|
||||
"__mips64")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH mips
|
||||
SYMBOLS
|
||||
"__mips"
|
||||
"__mips__"
|
||||
"_M_MRX000")
|
||||
detect_architecture_symbols(
|
||||
ARCH mips
|
||||
SYMBOLS
|
||||
"__mips"
|
||||
"__mips__"
|
||||
"_M_MRX000")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH ppc64
|
||||
SYMBOLS
|
||||
"__ppc64__"
|
||||
"__powerpc64__"
|
||||
"_ARCH_PPC64"
|
||||
"_M_PPC64")
|
||||
detect_architecture_symbols(
|
||||
ARCH ppc64
|
||||
SYMBOLS
|
||||
"__ppc64__"
|
||||
"__powerpc64__"
|
||||
"_ARCH_PPC64"
|
||||
"_M_PPC64")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH ppc
|
||||
SYMBOLS
|
||||
"__ppc__"
|
||||
"__ppc"
|
||||
"__powerpc__"
|
||||
"_ARCH_COM"
|
||||
"_ARCH_PWR"
|
||||
"_ARCH_PPC"
|
||||
"_M_MPPC"
|
||||
"_M_PPC")
|
||||
detect_architecture_symbols(
|
||||
ARCH ppc
|
||||
SYMBOLS
|
||||
"__ppc__"
|
||||
"__ppc"
|
||||
"__powerpc__"
|
||||
"_ARCH_COM"
|
||||
"_ARCH_PWR"
|
||||
"_ARCH_PPC"
|
||||
"_M_MPPC"
|
||||
"_M_PPC")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH sparc64
|
||||
SYMBOLS
|
||||
"__sparc_v9__")
|
||||
detect_architecture_symbols(
|
||||
ARCH sparc64
|
||||
SYMBOLS
|
||||
"__sparc_v9__")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH sparc
|
||||
SYMBOLS
|
||||
"__sparc__"
|
||||
"__sparc")
|
||||
detect_architecture_symbols(
|
||||
ARCH sparc
|
||||
SYMBOLS
|
||||
"__sparc__"
|
||||
"__sparc")
|
||||
|
||||
# I don't actually know about loongarch32 since crossdev does not support it, only 64
|
||||
detect_architecture_symbols(
|
||||
ARCH loongarch64
|
||||
SYMBOLS
|
||||
"__loongarch__"
|
||||
"__loongarch64")
|
||||
# I don't actually know about loongarch32 since crossdev does not support it, only 64
|
||||
detect_architecture_symbols(
|
||||
ARCH loongarch64
|
||||
SYMBOLS
|
||||
"__loongarch__"
|
||||
"__loongarch64")
|
||||
|
||||
detect_architecture_symbols(
|
||||
ARCH wasm
|
||||
SYMBOLS
|
||||
"__EMSCRIPTEN__")
|
||||
detect_architecture_symbols(
|
||||
ARCH wasm
|
||||
SYMBOLS
|
||||
"__EMSCRIPTEN__")
|
||||
|
||||
# "generic" target
|
||||
# If you have reached this point, you're on some as-of-yet unsupported architecture.
|
||||
# See the docs up above for known unsupported architectures
|
||||
# If you're not in the list... I think you know what you're doing.
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(ARCHITECTURE "GENERIC")
|
||||
set(ARCHITECTURE_GENERIC 1)
|
||||
add_definitions(-DARCHITECTURE_GENERIC=1)
|
||||
endif()
|
||||
# "generic" target
|
||||
# If you have reached this point, you're on some as-of-yet unsupported architecture.
|
||||
# See the docs up above for known unsupported architectures
|
||||
# If you're not in the list... I think you know what you're doing.
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(ARCHITECTURE "GENERIC")
|
||||
set(ARCHITECTURE_GENERIC 1)
|
||||
add_definitions(-DARCHITECTURE_GENERIC=1)
|
||||
endif()
|
||||
|
||||
message(STATUS "[DetectArchitecture] Target architecture: ${ARCHITECTURE}")
|
||||
set(ARCHITECTURE "${ARCHITECTURE}" PARENT_SCOPE)
|
||||
set(ARCHITECTURE_${ARCHITECTURE} 1 PARENT_SCOPE)
|
||||
endfunction()
|
||||
message(STATUS "[DetectArchitecture] Target architecture: ${ARCHITECTURE}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue