vcpkg/ports/clapack/portfile.cmake

68 lines
2.6 KiB
CMake
Raw Normal View History

if(EXISTS "${CURRENT_INSTALLED_DIR}/share/lapack-reference/copyright")
message(FATAL_ERROR "Can't build ${PORT} if lapack-reference is installed. Please remove lapack-reference:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.")
endif()
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371) * [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz"
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371) * [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
FILENAME "clapack-3.2.1.tgz"
SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371) * [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
remove_internal_blas.patch
fix-ConfigFile.patch
2019-09-30 07:48:10 +08:00
fix-install.patch
support-uwp.patch
)
set(ARITH_PATH)
if(DEFINED CLAPACK_ARITH_PATH)
set(ARITH_PATH "-DARITH_PATH=${CLAPACK_ARITH_PATH}")
elseif(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
if(VCPKG_TARGET_ARCHITECTURE MATCHES "^x64$|^arm64$")
set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_win64.h")
else()
set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_win32.h")
endif()
elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)
set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_osx.h")
elseif(VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(ARITH_PATH "-DARITH_PATH=${CMAKE_CURRENT_LIST_DIR}/arith_linux64.h")
else()
message(WARNING
"Unable to cross-compile clapack for ${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_CMAKE_SYSTEM_NAME}.
No arith.h is available and arithchk must be executed for the target.
To fix this issue, define CLAPACK_ARITH_PATH in your triplet to the location of a pre-generated arith.h file.
Continuing with trying to run arithchk anyway.")
endif()
endif()
vcpkg_configure_cmake(
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371) * [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_DEBUG_POSTFIX=d
${ARITH_PATH}
)
vcpkg_install_cmake()
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371) * [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
vcpkg_copy_pdbs()
#TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack)
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371) * [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Install clapack wrappers.
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)