vcpkg/ports/fftw3/CMakeLists.txt

97 lines
3.3 KiB
CMake
Raw Normal View History

2017-03-06 15:19:08 +08:00
cmake_minimum_required (VERSION 3.0)
project (fftw3)
2017-02-24 13:16:23 +08:00
# From: http://stackoverflow.com/questions/10252336/fftw-in-visual-studio-2010
# Standard: /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR
2017-03-06 15:19:08 +08:00
if (WIN32)
add_definitions(-D_OPENMP -DLIBFFTWF33_EXPORTS /openmp /bigobj) # Visual Studio 2005 and up supports OpenMP
2017-03-06 15:19:08 +08:00
endif (WIN32)
2017-02-24 13:16:23 +08:00
if (BUILD_SHARED_LIBS)
add_definitions(-DFFTW_DLL)
endif()
2017-02-24 13:16:23 +08:00
file(GLOB fftw_api_SOURCE api/*.c api/*.h)
file(GLOB fftw_dft_SOURCE dft/*.c dft/*.h)
file(GLOB fftw_dft_scalar_SOURCE dft/scalar/*.c dft/scalar/*.h)
file(GLOB fftw_dft_scalar_codelets_SOURCE dft/scalar/codelets/*.c dft/scalar/codelets/*.h)
file(GLOB fftw_dft_simd_SOURCE dft/simd/*.c dft/simd/*.h)
file(GLOB fftw_dft_simd_sse2_SOURCE dft/simd/sse2/*.c dft/simd/sse2/*.h)
file(GLOB fftw_kernel_SOURCE kernel/*.c kernel/*.h)
file(GLOB fftw_rdft_SOURCE rdft/*.c rdft/*.h)
file(GLOB fftw_rdft_scalar_SOURCE rdft/scalar/*.c rdft/scalar/*.h)
2017-03-06 15:19:08 +08:00
file(GLOB fftw_rdft_scalar_r2cb_SOURCE rdft/scalar/r2cb/*.c
2017-02-24 13:16:23 +08:00
rdft/scalar/r2cb/*.h)
2017-03-06 15:19:08 +08:00
file(GLOB fftw_rdft_scalar_r2cf_SOURCE rdft/scalar/r2cf/*.c
2017-02-24 13:16:23 +08:00
rdft/scalar/r2cf/*.h)
2017-03-06 15:19:08 +08:00
file(GLOB fftw_rdft_scalar_r2r_SOURCE rdft/scalar/r2r/*.c
2017-02-24 13:16:23 +08:00
rdft/scalar/r2r/*.h)
file(GLOB fftw_rdft_simd_SOURCE rdft/simd/*.c rdft/simd/*.h)
file(GLOB fftw_rdft_simd_sse2_SOURCE rdft/simd/sse2/*.c rdft/simd/sse2/*.h)
file(GLOB fftw_reodft_SOURCE reodft/*.c reodft/*.h)
file(GLOB fftw_simd_support_SOURCE simd-support/*.c simd-support/*.h)
#file(GLOB fftw_threads_SOURCE threads/*.c threads/*.h)
set(${fftw_threads_SOURCE}
2017-03-06 15:19:08 +08:00
threads/api.c
threads/conf.c
threads/ct.c
2017-02-24 13:16:23 +08:00
threads/dft-vrank-qeq1.c
threads/f77api.c
threads/hc2hc.c
threads/openmp.c
threads/rdft-vrank-geq1.c
threads/vrank-geq1-rdft2.c)
include_directories(
kernel
api
dft
dft/scalar
dft/scalar/codelets # really needed?
2017-02-24 13:16:23 +08:00
dft/simd
dft/simd/sse2
rdft
rdft/scalar
rdft/simd
reodft
${CMAKE_CURRENT_SOURCE_DIR} # thats where the config.h is located
simd-support
)
# Create a target for the library
2017-03-06 15:19:08 +08:00
add_library(fftw3
2017-02-24 13:16:23 +08:00
${fftw_api_SOURCE}
${fftw_dft_SOURCE}
${fftw_dft_scalar_SOURCE}
${fftw_dft_scalar_codelets_SOURCE}
${fftw_dft_simd_SOURCE}
${fftw_dft_simd_sse2_SOURCE}
${fftw_kernel_SOURCE}
${fftw_rdft_SOURCE}
${fftw_rdft_scalar_SOURCE}
${fftw_rdft_scalar_r2cb_SOURCE}
${fftw_rdft_scalar_r2cf_SOURCE}
${fftw_rdft_scalar_r2r_SOURCE}
${fftw_rdft_simd_SOURCE}
${fftw_rdft_simd_sse2_SOURCE}
${fftw_reodft_SOURCE}
${fftw_simd_support_SOURCE}
${fftw_threads_SOURCE}
)
install(TARGETS fftw3
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
2017-03-06 15:19:08 +08:00
LIBRARY DESTINATION lib)