Skip to content

Commit

Permalink
Add the include directory provided by Homebrew if the platform is mac…
Browse files Browse the repository at this point in the history
…OS on ARM64
  • Loading branch information
MasWag committed Jan 9, 2024
1 parent 165c43f commit a499b2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ if(USE_FFTW3)
elseif(USE_SPQLIOX_AARCH64)
add_compile_definitions(USE_SPQLIOX_AARCH64)
add_subdirectory(thirdparties/spqliox_aarch64)
# Check if the platform is macOS and the architecture is ARM64
if(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
include_directories(/opt/homebrew/include)
endif()
else()
add_subdirectory(thirdparties/spqlios)
endif()
Expand Down
8 changes: 7 additions & 1 deletion thirdparties/spqliox_aarch64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ set(SPQLIOX_AARCH64_HEADERS fft_processor_spqliox_aarch64.h
add_library(spqliox_aarch64 STATIC ${SPQLIOX_AARCH64_SRCS}
${SPQLIOX_AARCH64_HEADERS})

target_include_directories(spqliox_aarch64 PUBLIC ${PROJECT_SOURCE_DIR}/include)
# Check if the platform is macOS and the architecture is ARM64
if(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
# Add the include directory provided by Homebrew
target_include_directories(spqliox_aarch64 PUBLIC ${PROJECT_SOURCE_DIR}/include /opt/homebrew/include)
else()
target_include_directories(spqliox_aarch64 PUBLIC ${PROJECT_SOURCE_DIR}/include)
endif()

0 comments on commit a499b2d

Please sign in to comment.