CMake: Add cmake macro for sse2neon.

This commit is contained in:
AriDEV 2024-12-17 22:50:11 +01:00
parent 495b1cb219
commit 14e1c9df50
2 changed files with 32 additions and 0 deletions

View file

@ -72,6 +72,10 @@ if( UNIX )
find_package(ZLIB)
find_package(BZip2)
find_package(Jemalloc)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch")
find_package(sse2neon)
endif()
endif()
if(NOT WITHOUT_GIT)

View file

@ -0,0 +1,28 @@
#
# This file is part of Project SkyFire https://www.projectskyfire.org.
# See COPYRIGHT file for Copyright information
#
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch")
find_path(SSE2NEON_INCLUDE_DIR
NAMES
sse2neon.h
HINTS
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES
sse2neon
)
# handle the QUIETLY and REQUIRED arguments and set SSE2NEON_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(sse2neon DEFAULT_MSG SSE2NEON_INCLUDE_DIR)
if(SSE2NEON_FOUND)
set(SSE2NEON_INCLUDE_DIRS ${SSE2NEON_INCLUDE_DIR})
endif()
mark_as_advanced(SSE2NEON_INCLUDE_DIR)
endif()