vcpkg/ports/eigen3/portfile.cmake

42 lines
1.5 KiB
CMake
Raw Normal View History

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
2016-09-20 21:29:34 +08:00
)
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()
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/*")
2020-11-06 09:30:40 +08:00
# 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")