mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 13:27:56 +08:00
[eigen3] fix the missing CMakeLists.txt problem and copy additional Eigen directory to include
This commit is contained in:
parent
17df9be71f
commit
8d011eee97
@ -1,3 +1,3 @@
|
||||
Source: eigen3
|
||||
Version: 3.3.3-3
|
||||
Version: 3.3.3-4
|
||||
Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
|
||||
|
@ -6,7 +6,14 @@ vcpkg_download_distfile(ARCHIVE
|
||||
FILENAME "eigen-3.3.3.tar.bz2"
|
||||
SHA512 bb5a8b761371e516f0a344a7c9f6e369e21c2907c8548227933ca6010fc607a66c8d6ff7c41b1aec3dea7d482ce8c2a09e38ae5c7a2c5b16bdd8007e7a81ecc3
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
# check if required file exists
|
||||
if((NOT EXISTS ${SOURCE_PATH}/Eigen/CMakeLists.txt) OR (NOT EXISTS ${SOURCE_PATH}/unsupported/Eigen/CMakeLists.txt))
|
||||
message(STATUS "Missing CMakeLists.txt in cache, remove ${CURRENT_BUILDTREES_DIR} and try again.")
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR})
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
@ -25,6 +32,13 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGE
|
||||
string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}")
|
||||
|
||||
# Copy the eigen header files to conventional location for user-wide MSBuild integration
|
||||
file(COPY ${SOURCE_PATH}/Eigen DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
# and no need to leave CMakeLists.txt there
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/include/Eigen/CMakeLists.txt)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Eigen/CMakeLists.txt)
|
||||
endif()
|
||||
|
||||
# Put the licence file where vcpkg expects it
|
||||
file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/eigen3/COPYING.README ${CURRENT_PACKAGES_DIR}/share/eigen3/copyright)
|
||||
|
Loading…
Reference in New Issue
Block a user