Skip to content

Commit

Permalink
[eigen3] disable Fortran in iOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Sep 16, 2024
1 parent 815a9df commit 27efc9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ports/eigen3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,28 @@ vcpkg_from_gitlab(
HEAD_REF master
)

if(VCPKG_TARGET_IS_ANDROID)
if(VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_IOS)
list(APPEND PLATFORM_OPTIONS -DCMAKE_Fortran_COMPILER=OFF)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DEIGEN_BUILD_DOC=OFF
-DEIGEN_BUILD_PKGCONFIG=ON
${PLATFORM_OPTIONS}
OPTIONS_RELEASE
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/eigen3
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}
-DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/pkgconfig
OPTIONS_DEBUG
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/share/eigen3
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PORT}
-DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT} PACKAGE_NAME Eigen3)
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")

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
Expand Down
1 change: 1 addition & 0 deletions ports/eigen3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "eigen3",
"version-date": "2024-08-01",
"port-version": 1,
"description": "C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.",
"homepage": "https://gitlab.com/libeigen/eigen",
"license": "MPL-2.0",
Expand Down

0 comments on commit 27efc9d

Please sign in to comment.