mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 22:51:37 +08:00
Improve the static vs dynamic handling of fftw3
This commit is contained in:
parent
e89d6f54a3
commit
cb1cf039d8
@ -6,9 +6,13 @@ project (fftw3)
|
||||
# Standard: /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR
|
||||
if (WIN32)
|
||||
set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W4 /Zi /EHsc /GR- /MP /openmp /bigobj")
|
||||
add_definitions(-D_OPENMP -DFFTW_DLL -DLIBFFTWF33_EXPORTS) # Visual Studio 2005 and up supports OpenMP
|
||||
add_definitions(-D_OPENMP -DLIBFFTWF33_EXPORTS) # Visual Studio 2005 and up supports OpenMP
|
||||
endif (WIN32)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-DFFTW_DLL)
|
||||
endif()
|
||||
|
||||
|
||||
file(GLOB fftw_api_SOURCE api/*.c api/*.h)
|
||||
file(GLOB fftw_dft_SOURCE dft/*.c dft/*.h)
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- a/api/fftw3.h 2017-01-15 13:03:24.000000000 +0100
|
||||
+++ b/api/fftw3.h 2017-02-24 04:05:36.051091700 +0100
|
||||
--- a/fftw3.h 2017-01-15 13:03:24.000000000 +0100
|
||||
+++ b/fftw3.h 2017-02-24 04:05:36.051091700 +0100
|
||||
@@ -47,6 +47,8 @@
|
||||
#ifndef FFTW3_H
|
||||
#define FFTW3_H
|
||||
|
@ -16,22 +16,12 @@ vcpkg_download_distfile(ARCHIVE
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch)
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
@ -39,6 +29,13 @@ vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch)
|
||||
endif()
|
||||
|
||||
# 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)
|
||||
|
Loading…
Reference in New Issue
Block a user