2021-04-30 06:43:20 +08:00
# We use the release tarball from GitHub instead of the sources in the repo because:
# - igraph will not compile from the git sources unless there is an actual git repository to back it. This is because it detects the version from git tags. The release tarball has the version hard-coded.
# - The release tarball contains pre-generated parser sources, which eliminates the dependency on bison/flex.
vcpkg_download_distfile ( ARCHIVE
2024-06-29 08:26:21 +08:00
U R L S " h t t p s : / / g i t h u b . c o m / i g r a p h / i g r a p h / r e l e a s e s / d o w n l o a d / 0 . 1 0 . 1 3 / i g r a p h - 0 . 1 0 . 1 3 . t a r . g z "
F I L E N A M E " i g r a p h - 0 . 1 0 . 1 3 . t a r . g z "
S H A 5 1 2 2 b 6 f 5 b 2 1 9 7 1 3 c 1 2 1 1 4 0 6 6 c 1 a 2 a 5 a 6 0 d 7 9 6 6 5 b 7 7 b 2 7 9 0 0 c 9 c b 0 6 a b 8 0 e 8 6 0 8 8 e 9 6 e f 6 4 a 9 4 1 f b 4 6 1 5 e 8 6 8 3 3 e 6 0 d f e 7 d 9 d 4 e 1 3 d 8 5 0 2 0 5 3 9 1 7 2 1 e 2 7 a c c 6 c c 4 9 8 d a 2 f d
2021-04-30 06:43:20 +08:00
)
2023-01-05 05:19:17 +08:00
vcpkg_extract_source_archive (
S O U R C E _ P A T H
2021-04-30 06:43:20 +08:00
A R C H I V E $ { A R C H I V E }
2022-06-07 00:22:27 +08:00
P A T C H E S
" g l p k - u w p . p a t c h " # patch GLPK for UWP compatibility
2021-04-30 06:43:20 +08:00
)
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2021-06-04 03:39:51 +08:00
F E A T U R E S
2022-04-22 23:49:39 +08:00
g r a p h m l I G R A P H _ G R A P H M L _ S U P P O R T
o p e n m p I G R A P H _ O P E N M P _ S U P P O R T
2021-04-30 06:43:20 +08:00
)
2021-11-16 08:46:23 +08:00
# Allow cross-compilation. See https://igraph.org/c/html/latest/igraph-Installation.html#igraph-Installation-cross-compiling
2021-04-30 06:43:20 +08:00
set ( ARITH_H "" )
if ( VCPKG_TARGET_IS_OSX )
set ( ARITH_H ${ CURRENT_PORT_DIR } /arith_osx.h )
elseif ( VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP )
if ( VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" )
set ( ARITH_H ${ CURRENT_PORT_DIR } /arith_win32.h )
elseif ( VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" )
set ( ARITH_H ${ CURRENT_PORT_DIR } /arith_win64.h )
endif ( )
endif ( )
2021-11-16 08:46:23 +08:00
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2021-04-30 06:43:20 +08:00
O P T I O N S
- D I G R A P H _ E N A B L E _ L T O = A U T O
# ARPACK not yet available in vcpkg.
- D I G R A P H _ U S E _ I N T E R N A L _ A R P A C K = O N
# GLPK is not yet available in vcpkg.
- D I G R A P H _ U S E _ I N T E R N A L _ G L P K = O N
2021-11-16 08:46:23 +08:00
# Currently, external GMP provides no performance or functionality benefits.
2021-04-30 06:43:20 +08:00
- D I G R A P H _ U S E _ I N T E R N A L _ G M P = O N
2022-01-07 05:17:47 +08:00
# PLFIT is not yet available in vcpkg.
- D I G R A P H _ U S E _ I N T E R N A L _ P L F I T = O N
2022-04-22 23:49:39 +08:00
# Use BLAS and LAPACK from vcpkg
- D I G R A P H _ U S E _ I N T E R N A L _ B L A S = O F F
- D I G R A P H _ U S E _ I N T E R N A L _ L A P A C K = O F F
2021-04-30 06:43:20 +08:00
- D F 2 C _ E X T E R N A L _ A R I T H _ H E A D E R = $ { A R I T H _ H }
2022-12-20 03:36:23 +08:00
- D I G R A P H _ W A R N I N G S _ A S _ E R R O R S = O F F
2021-04-30 06:43:20 +08:00
$ { F E A T U R E _ O P T I O N S }
)
2021-11-16 08:46:23 +08:00
vcpkg_cmake_install ( )
2021-04-30 06:43:20 +08:00
vcpkg_copy_pdbs ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
2021-11-16 08:46:23 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH lib/cmake/igraph )
2021-04-30 06:43:20 +08:00
file ( INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
2021-10-28 06:19:28 +08:00
vcpkg_fixup_pkgconfig ( )