mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
* Feature: Properly detect ARM32/ARM64 in the CMake build process and enable ARM NEON when either of these are detected.
This commit is contained in:
parent
69216b706a
commit
6b56210a47
2 changed files with 22 additions and 9 deletions
|
|
@ -24,13 +24,17 @@ project(lpng)
|
|||
|
||||
# addDef(PNG_NO_ASSEMBLER_CODE)
|
||||
|
||||
# Issues with Neon at the moment (Arm support)
|
||||
# https://sourceforge.net/p/libpng/bugs/281/
|
||||
set(PNG_ARM_NEON off CACHE STRING "")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
# Enables NEON for libpng
|
||||
if ( TORQUE_CPU_ARM32 OR TORQUE_CPU_ARM64 )
|
||||
set(PNG_INTEL_NEON on CACHE STRING "")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=1)
|
||||
addPath("${libDir}/lpng/arm")
|
||||
else()
|
||||
set(PNG_ARM_NEON off CACHE STRING "")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
endif()
|
||||
|
||||
# Enables SSE for libpng - also takes care of compiler warnings.
|
||||
# If we don't want SSE, we should set it to off/0.
|
||||
if ( TORQUE_CPU_X32 OR TORQUE_CPU_X64 )
|
||||
set(PNG_INTEL_SSE on CACHE STRING "")
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue