gctl/dep/cmake/FFTW3/FFTW3Config.cmake

21 lines
707 B
CMake
Raw Normal View History

2024-09-10 15:45:07 +08:00
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
# change the following options as needed
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
2025-05-10 22:38:33 +08:00
set_and_check(FFTW3_INCLUDE_DIRS "/opt/homebrew/include")
set_and_check(FFTW3_LIBRARY_DIRS "/opt/homebrew/lib")
2024-09-10 15:45:07 +08:00
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
2025-05-10 22:38:33 +08:00
set_and_check(FFTW3_INCLUDE_DIRS "/usr/include")
set_and_check(FFTW3_LIBRARY_DIRS "/usr/lib")
2024-09-10 15:45:07 +08:00
else()
message(FATAL_ERROR "Unset operation system for FFTW3. Please edit the FFTW3Config.cmake file.")
endif()
2025-05-10 22:38:33 +08:00
set(FFTW3_LIBRARIES fftw3)