2019-04-12 14:03:35 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-06-01 04:46:43 +08:00
|
|
|
REPO wpilibsuite/allwpilib
|
2020-08-14 04:34:09 +08:00
|
|
|
REF 35eb90c135eba994a2ca2cbd50a68c367910f4b6
|
|
|
|
SHA512 55bc608632ab67c097f3cce7c5ad9790b2b123a633c93bf5b4008f90bf79538cc142c911850d5f49b75e3a12f43ffad9f6f5f9bcdf1351cce7513ecc4b04e439
|
2022-07-09 04:02:45 +08:00
|
|
|
PATCHES fix-dependency-libuv.patch
|
2019-04-12 14:03:35 +08:00
|
|
|
)
|
|
|
|
|
2020-08-14 04:34:09 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
INVERTED_FEATURES
|
|
|
|
cameraserver WITHOUT_CSCORE
|
|
|
|
allwpilib WITHOUT_ALLWPILIB
|
|
|
|
)
|
2019-04-12 14:03:35 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-04-12 14:03:35 +08:00
|
|
|
OPTIONS
|
2020-08-14 04:34:09 +08:00
|
|
|
-DWITHOUT_JAVA=ON
|
|
|
|
${FEATURE_OPTIONS}
|
2019-04-14 05:38:13 +08:00
|
|
|
-DUSE_VCPKG_LIBUV=ON
|
2019-08-28 07:05:04 +08:00
|
|
|
-DUSE_VCPKG_EIGEN=ON
|
2019-04-15 01:05:22 +08:00
|
|
|
-DFLAT_INSTALL_WPILIB=ON
|
2019-04-12 14:03:35 +08:00
|
|
|
)
|
2022-07-09 04:02:45 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-04-12 14:03:35 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/ntcore/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/wpiutil/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
2020-08-14 04:34:09 +08:00
|
|
|
|
|
|
|
if ("allwpilib" IN_LIST FEATURES)
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/hal/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/gen")
|
2019-04-12 14:03:35 +08:00
|
|
|
endif()
|
2020-08-14 04:34:09 +08:00
|
|
|
|
|
|
|
if ("cameraserver" IN_LIST FEATURES)
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/cameraserver/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/cscore/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
2019-04-12 14:03:35 +08:00
|
|
|
endif()
|
|
|
|
|
2019-04-15 01:05:22 +08:00
|
|
|
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" FILES_MATCHING PATTERN "*.dll")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" FILES_MATCHING PATTERN "*.dll")
|
2019-04-12 14:03:35 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" FILES_MATCHING PATTERN "*.so")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" FILES_MATCHING PATTERN "*.so")
|
2019-04-14 14:00:54 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" FILES_MATCHING PATTERN "*.dylib")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" FILES_MATCHING PATTERN "*.dylib")
|
2019-04-14 14:00:54 +08:00
|
|
|
endif()
|
2019-04-12 14:03:35 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" FILES_MATCHING PATTERN "*.lib")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" FILES_MATCHING PATTERN "*.lib")
|
2019-04-12 14:03:35 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" FILES_MATCHING PATTERN "*.a")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" FILES_MATCHING PATTERN "*.a")
|
2019-04-14 14:00:54 +08:00
|
|
|
|
2019-04-14 05:38:13 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2019-04-12 14:03:35 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|