2019-04-12 14:03:35 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-06-01 04:46:43 +08:00
|
|
|
REPO wpilibsuite/allwpilib
|
2019-08-28 07:05:04 +08:00
|
|
|
REF d10a1a797720014197c21dee38fdced73454dca4
|
|
|
|
SHA512 a76e8652b6d6a921d466e08bcf162ee1b28c06af031b616b2333f8a9479ffd12d1c301182dac86e5d7d59909a21cbee4e551028393df80671336546c14ecf606
|
2019-04-12 14:03:35 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(WITHOUT_JAVA ON)
|
|
|
|
set(WITHOUT_CSCORE ON)
|
|
|
|
set(WITHOUT_ALLWPILIB ON)
|
|
|
|
|
|
|
|
if ("cameraserver" IN_LIST FEATURES)
|
|
|
|
set(WITHOUT_CSCORE OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if ("allwpilib" IN_LIST FEATURES)
|
|
|
|
set(WITHOUT_ALLWPILIB OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-DWITHOUT_JAVA=${WITHOUT_JAVA}
|
|
|
|
-DWITHOUT_CSCORE=${WITHOUT_CSCORE}
|
|
|
|
-DWITHOUT_ALLWPILIB=${WITHOUT_ALLWPILIB}
|
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
|
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
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)
|
|
|
|
if (NOT WITHOUT_ALLWPILIB)
|
|
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/hal/gen/ 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)
|
|
|
|
endif()
|
|
|
|
if (NOT WITHOUT_CSCORE)
|
|
|
|
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)
|
|
|
|
endif()
|
|
|
|
|
2019-04-15 01:05:22 +08:00
|
|
|
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2019-04-14 14:00:54 +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
|
|
|
|
2019-04-14 14:00:54 +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")
|
|
|
|
|
|
|
|
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")
|
|
|
|
endif()
|
2019-04-12 14:03:35 +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-14 14:00:54 +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 05:38:13 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2019-04-12 14:03:35 +08:00
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wpilib RENAME copyright)
|