[CMake] Questions about FFTW as an External Project within ITK

Tyler Roscoe tyler at cryptio.net
Fri Dec 17 11:47:06 EST 2010


On Fri, Dec 17, 2010 at 10:40:30AM -0600, kent williams wrote:
> install(FILES ${CMAKE_BINARY_DIR}/FFTW/lib/libfftw3.a
> DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
> install(FILES ${CMAKE_BINARY_DIR}/FFTW/include/fftw3.h
> DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
> 
> I'm thinking thats kind of awful, but I don't know of a more elegant
> solution. I also don't know the CMake variable to use for the library
> file extension.

This is what fixup_bundle() in GetPrerequisites.cmake is for. 

> 2. I don't know how to make the Algorithms library depend on the FFTW
> external project.  If I do a sequential build, FFTW does get built
> before everything else, but if I do a parallel build, FFTW builds
> concurrent with the rest of ITK.  This could definitely fail.

If you're using FFTW as an external project, can't you just use
add_dependencies() to enforce the proper order?

tyler


More information about the CMake mailing list