mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 13:27:55 +08:00
6a80b201ad
This has already been fixed upstream. The Eigen version in vcpkg is just extremely old since there has been no new release done upstream.
43 lines
1.6 KiB
CMake
43 lines
1.6 KiB
CMake
vcpkg_buildpath_length_warning(37)
|
|
|
|
block(SCOPE_FOR VARIABLES PROPAGATE SOURCE_PATH)
|
|
set(VCPKG_BUILD_TYPE release) # header-only
|
|
|
|
vcpkg_from_gitlab(
|
|
GITLAB_URL https://gitlab.com
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO libeigen/eigen
|
|
REF "${VERSION}"
|
|
SHA512 ba75ecb760e32acf4ceaf27115468e65d4f77c44f8d519b5a13e7940af2c03a304ad433368cb6d55431f307c5c39e2666ab41d34442db3cf441638e51f5c3b6a
|
|
HEAD_REF master
|
|
PATCHES
|
|
remove_configure_checks.patch # This removes unnecessary configure checks. Eigen3 just installs headers not anything more.
|
|
fix-vectorized-reductions-half.patch # Remove this patch in the next update
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBUILD_TESTING=OFF
|
|
-DEIGEN_BUILD_DOC=OFF
|
|
-DEIGEN_BUILD_PKGCONFIG=ON
|
|
"-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/eigen3"
|
|
"-DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/pkgconfig"
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup()
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Config.cmake" "if (NOT TARGET eigen)" "if (NOT TARGET Eigen3::Eigen)")
|
|
endblock()
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
file(INSTALL "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/eigen3.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
|
endif()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(GLOB INCLUDES "${CURRENT_PACKAGES_DIR}/include/eigen3/*")
|
|
# Copy the eigen header files to conventional location for user-wide MSBuild integration
|
|
file(COPY ${INCLUDES} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.README")
|