|
| 1 | +# - Find clFFT, AMD's OpenCL FFT library |
| 2 | + |
| 3 | +# This script defines the following variables: |
| 4 | +# CLFFT_INCLUDE_DIRS - Location of clFFT's include directory. |
| 5 | +# CLFFT_LIBRARIES - Location of clFFT's libraries |
| 6 | +# CLFFT_FOUND - True if clFFT has been located |
| 7 | +# |
| 8 | +# If your clFFT installation is not in a standard installation directory, you |
| 9 | +# may provide a hint to where it may be found. Simply set the value CLFFT_ROOT |
| 10 | +# to the directory containing 'include/clFFT.h" prior to calling this script. |
| 11 | +# |
| 12 | +# By default this script will attempt to find the 32-bit version of clFFT. |
| 13 | +# If you desire to use the 64-bit version instead, set |
| 14 | +# set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) |
| 15 | +# prior to calling this script. |
| 16 | +# |
| 17 | +#============================================================================= |
| 18 | +# Copyright 2014 Brian Kloppenborg |
| 19 | +# |
| 20 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 21 | +# you may not use this file except in compliance with the License. |
| 22 | +# You may obtain a copy of the License at |
| 23 | +# |
| 24 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 25 | +# |
| 26 | +# Unless required by applicable law or agreed to in writing, software |
| 27 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 28 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 29 | +# See the License for the specific language governing permissions and |
| 30 | +# limitations under the License. |
| 31 | +#============================================================================= |
| 32 | + |
| 33 | +IF(CLFFT_INCLUDE_DIRS) |
| 34 | + # Already in cache, be silent |
| 35 | + set (CLFFT_FIND_QUIETLY TRUE) |
| 36 | +ENDIF (CLFFT_INCLUDE_DIRS) |
| 37 | + |
| 38 | +FIND_PATH(CLFFT_ROOT_DIR |
| 39 | + NAMES include/clFFT.h |
| 40 | + HINTS /usr/local/ ${CLFFT_ROOT} |
| 41 | + DOC "clFFT root directory.") |
| 42 | + |
| 43 | +FIND_PATH(_CLFFT_INCLUDE_DIRS |
| 44 | + NAMES clFFT.h |
| 45 | + HINTS ${CLFFT_ROOT_DIR}/include |
| 46 | + DOC "clFFT Include directory") |
| 47 | + |
| 48 | +FIND_LIBRARY(_CLFFT_LIBRARY |
| 49 | + NAMES clFFT |
| 50 | + HINTS ${CLFFT_ROOT_DIR}/lib) |
| 51 | + |
| 52 | +SET(CLFFT_INCLUDE_DIRS ${_CLFFT_INCLUDE_DIRS}) |
| 53 | +SET(CLFFT_LIBRARIES ${_CLFFT_LIBRARY}) |
| 54 | + |
| 55 | +# handle the QUIETLY and REQUIRED arguments and set CLFFT_FOUND to TRUE if |
| 56 | +# all listed variables are TRUE |
| 57 | +INCLUDE (FindPackageHandleStandardArgs) |
| 58 | +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLFFT DEFAULT_MSG CLFFT_LIBRARIES CLFFT_INCLUDE_DIRS) |
| 59 | +MARK_AS_ADVANCED(CLFFT_LIBRARIES CLFFT_INCLUDE_DIRS) |
| 60 | + |
| 61 | + |
0 commit comments