2017-05-24 21:49:47 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO open-mpi/hwloc
|
2023-10-03 08:26:43 +08:00
|
|
|
REF "hwloc-${VERSION}"
|
2024-01-27 01:31:18 +08:00
|
|
|
SHA512 e49ccb8ccaf7ce29cf46a99b1fc725dfcb2ac7e5f35ffd8d9bc7f085dae3de73840427efa9fdd38555e389dd948e7cd613481309fbb6e9dac6dc52db5c5da24c
|
2022-02-16 08:59:58 +08:00
|
|
|
PATCHES
|
|
|
|
fix_shared_win_build.patch
|
2022-12-20 06:45:44 +08:00
|
|
|
stdout_fileno.patch
|
2020-04-25 05:10:39 +08:00
|
|
|
)
|
2017-05-24 21:49:47 +08:00
|
|
|
|
2021-10-28 14:05:10 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
|
|
set(OPTIONS ac_cv_prog_cc_c99= # To avoid the compiler check for C99 which will fail for MSVC
|
|
|
|
--disable-plugin-dlopen)
|
|
|
|
endif()
|
2017-05-24 21:49:47 +08:00
|
|
|
|
2021-10-28 14:05:10 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
list(APPEND OPTIONS "HWLOC_LDFLAGS=-no-undefined")
|
2022-02-16 08:59:58 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_OSX)
|
|
|
|
list(APPEND OPTIONS "HWLOC_LDFLAGS=-framework CoreFoundation")
|
2017-05-23 10:38:11 +08:00
|
|
|
endif()
|
2021-10-28 14:05:10 +08:00
|
|
|
|
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
AUTOCONFIG
|
|
|
|
OPTIONS
|
|
|
|
${OPTIONS}
|
|
|
|
--disable-libxml2
|
|
|
|
--disable-opencl
|
|
|
|
--disable-cairo
|
|
|
|
--disable-cuda
|
|
|
|
--disable-libudev
|
|
|
|
--disable-levelzero
|
|
|
|
--disable-nvml
|
|
|
|
--disable-rsmi
|
|
|
|
--disable-pci
|
|
|
|
#--disable-cpuid
|
|
|
|
#--disable-picky
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2021-11-10 03:44:04 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/hwloc/bin/hwloc-compress-dir")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/hwloc/bin/hwloc-compress-dir" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
|
|
|
|
endif()
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/hwloc/debug/bin/hwloc-compress-dir")
|
2022-01-28 00:09:18 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/hwloc/debug/bin/hwloc-compress-dir" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../..")
|
2021-11-10 03:44:04 +08:00
|
|
|
endif()
|
2018-10-13 06:07:30 +08:00
|
|
|
|
2022-01-27 07:34:01 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/hwloc/bin/hwloc-gather-topology")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/hwloc/bin/hwloc-gather-topology" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
|
|
|
|
endif()
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/hwloc/debug/bin/hwloc-gather-topology")
|
2022-01-28 00:09:18 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/hwloc/debug/bin/hwloc-gather-topology" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../..")
|
2022-01-27 07:34:01 +08:00
|
|
|
endif()
|
|
|
|
|
2017-05-23 10:38:11 +08:00
|
|
|
# Handle copyright
|
2021-10-28 14:05:10 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
|
|
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/COPYING.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/README.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/NEWS.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/COPYING.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/README.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/NEWS.txt"
|
|
|
|
)
|