mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-14 07:45:06 +00:00
5ac894c59c
A complete redesign of the component and dependency system is necessary in order to support additional platforms, such as MacOS and other Linux platforms. Additionally it results in a much cleaner code base, which is less confusing overall. Eventually it might be necessary to push components of StreamFX into their own CMake projects, as it is getting kind of complex now. Especially with the push for a proper plugin manager, things get dicey for big plugins like StreamFX.
41 lines
1 KiB
CMake
41 lines
1 KiB
CMake
# Setup
|
|
set(ARCH_INSTR_32 "i386;i686;x86;arm;ARM")
|
|
set(ARCH_INSTR_64 "x86_64;AMD64;IA64;arm64;ARM64")
|
|
set(ARCH_INSTR_X86 "i386;i686;x86;x86_64;AMD64")
|
|
set(ARCH_INSTR_ARM "arm;ARM;arm64;ARM64")
|
|
set(ARCH_INSTR_ITANIUM "IA64")
|
|
set(ARCH_BITS 0)
|
|
set(ARCH_BITS_POINTER 0)
|
|
set(ARCH_INST "")
|
|
|
|
# Bitness
|
|
list(FIND ARCH_INSTR_32 "${CMAKE_SYSTEM_PROCESSOR}" FOUND)
|
|
if(FOUND GREATER -1)
|
|
set(ARCH_BITS 32)
|
|
endif()
|
|
|
|
list(FIND ARCH_INSTR_64 "${CMAKE_SYSTEM_PROCESSOR}" FOUND)
|
|
if(FOUND GREATER -1)
|
|
set(ARCH_BITS 64)
|
|
endif()
|
|
|
|
# Pointer Size (bits)
|
|
math(EXPR ARCH_BITS_POINTER "8*${CMAKE_SIZEOF_VOID_P}")
|
|
|
|
# Basic Instruction Set
|
|
list(FIND ARCH_INSTR_X86 "${CMAKE_SYSTEM_PROCESSOR}" FOUND)
|
|
if(FOUND GREATER -1)
|
|
set(ARCH_INST "x86")
|
|
endif()
|
|
|
|
list(FIND ARCH_INSTR_ARM "${CMAKE_SYSTEM_PROCESSOR}" FOUND)
|
|
if(FOUND GREATER -1)
|
|
set(ARCH_INST "ARM")
|
|
endif()
|
|
|
|
list(FIND ARCH_INSTR_ITANIUM "${CMAKE_SYSTEM_PROCESSOR}" FOUND)
|
|
if(FOUND GREATER -1)
|
|
set(ARCH_INST "Itanium")
|
|
endif()
|
|
|
|
message(STATUS "Targetting ${ARCH_INST} with ${ARCH_BITS}bits and a pointer size of ${ARCH_BITS_POINTER}bit.")
|