From 6363688b6d2f3522a4ce48cedb60da31775cd923 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 20 Dec 2017 12:28:54 -0600 Subject: [PATCH] [fftw] Build more libs --- ports/fftw3/CONTROL | 2 +- ports/fftw3/portfile.cmake | 44 +++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index ccdc0e7ee9..fd9e597660 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.7-1 +Version: 3.3.7-2 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 3170466354..2cf78f44ca 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -17,33 +17,33 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) -option(BUILD_SINGLE "Additionally build single precision library" ON) -option(BUILD_LONG_DOUBLE "Additionally build long-double precision library" ON) +foreach(PRECISION ENABLE_DEFAULT_PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -D${PRECISION}=ON + ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DBUILD_SINGLE=${BUILD_SINGLE} -DBUILD_LONG_DOUBLE=${BUILD_LONG_DOUBLE} -) + vcpkg_install_cmake() + vcpkg_copy_pdbs() -vcpkg_install_cmake() -vcpkg_copy_pdbs() + file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/fftw3) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - - -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch) -endif() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch) + endif() + # Cleanup + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endforeach() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fftw3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/fftw3/COPYING ${CURRENT_PACKAGES_DIR}/share/fftw3/copyright)