Skip to content

Commit

Permalink
COMP: Fix fftw library ordering
Browse files Browse the repository at this point in the history
Newer versions of FFTW (i.e. 3.3.8) have a dependance between the threads lib and lib
  • Loading branch information
hjmjohnson committed Feb 15, 2020
1 parent 4d8ced4 commit c65f236
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMake/FindFFTW.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF)
set(FFTWD_FOUND 1)
get_filename_component(FFTW_LIBDIR ${FFTWD_LIB} PATH)
if(FFTWD_THREADS_LIB)
set(FFTWD_LIB ${FFTWD_LIB} ${FFTWD_THREADS_LIB} )
set(FFTWD_LIB ${FFTWD_THREADS_LIB} ${FFTWD_LIB} )
endif()
else()
message(FATAL_ERROR "fftw3 not found.")
Expand All @@ -199,7 +199,7 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF)
set(FFTWF_FOUND 1)
get_filename_component(FFTW_LIBDIR ${FFTWF_LIB} PATH)
if(FFTWF_THREADS_LIB)
set(FFTWF_LIB ${FFTWF_LIB} ${FFTWF_THREADS_LIB} )
set(FFTWF_LIB ${FFTWF_THREADS_LIB} ${FFTWF_LIB})
endif()
else()
message(FATAL_ERROR "fftw3f not found.")
Expand Down
4 changes: 2 additions & 2 deletions Modules/Filtering/FFT/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if( ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW)
endif()
else()
add_dependencies(ITKFFT fftwd)
target_link_libraries(ITKFFT LINK_PUBLIC fftw3 fftw3_threads)
target_link_libraries(ITKFFT LINK_PUBLIC fftw3_threads fftw3)
endif()
endif()

Expand All @@ -27,7 +27,7 @@ if( ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW)
endif()
else()
add_dependencies(ITKFFT fftwf)
target_link_libraries(ITKFFT LINK_PUBLIC fftw3f fftw3f_threads)
target_link_libraries(ITKFFT LINK_PUBLIC fftw3f_threads fftw3f)
endif()
endif()
endif()

0 comments on commit c65f236

Please sign in to comment.