diff options
| author | Sean Yen <seanyen@microsoft.com> | 2020-08-21 15:33:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-21 15:33:35 -0700 |
| commit | 19994125061bc665c478870f72fbecf3e1a269b7 (patch) | |
| tree | d1505e5ef6a9ee8a8ef6549895f620ac64a1b1db | |
| parent | a64399e0a641a0613024f99fbb4f235e81a4b77c (diff) | |
| download | vcpkg-19994125061bc665c478870f72fbecf3e1a269b7.tar.gz vcpkg-19994125061bc665c478870f72fbecf3e1a269b7.zip | |
[behaviortree-cpp] Add new port (#12769)
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
| -rw-r--r-- | ports/behaviortree-cpp/001_port_fixes.patch | 13 | ||||
| -rw-r--r-- | ports/behaviortree-cpp/portfile.cmake | 49 | ||||
| -rw-r--r-- | ports/behaviortree-cpp/vcpkg.json | 10 |
3 files changed, 72 insertions, 0 deletions
diff --git a/ports/behaviortree-cpp/001_port_fixes.patch b/ports/behaviortree-cpp/001_port_fixes.patch new file mode 100644 index 000000000..3cb4ac29e --- /dev/null +++ b/ports/behaviortree-cpp/001_port_fixes.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 75dea11..4eea781 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -229,7 +229,7 @@ if( ZMQ_FOUND )
+ endif()
+
+ if(MSVC)
+- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W4 /WX)
++ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W4 /wd4702)
+ else()
+ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE
+ -Wall -Wextra -Werror=return-type)
diff --git a/ports/behaviortree-cpp/portfile.cmake b/ports/behaviortree-cpp/portfile.cmake new file mode 100644 index 000000000..a5baff43c --- /dev/null +++ b/ports/behaviortree-cpp/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_fail_port_install(ON_TARGET "UWP")
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/3.5.1.tar.gz"
+ FILENAME "BehaviorTree.CPP.3.5.1.tar.gz"
+ SHA512 66db43225e692fa0f9073e63bdff765c037440372478792a9b442103a8bed945f5c3ae1d66266b86cb41d0006404a8297708a799ec0c7286c2beec6f964a4ac6
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ PATCHES
+ 001_port_fixes.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+set(TOOLS bt3_log_cat bt3_plugin_manifest)
+
+foreach(tool ${TOOLS})
+ set(suffix ${VCPKG_TARGET_EXECUTABLE_SUFFIX})
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}")
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}")
+ endif()
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}")
+ file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}")
+ endif()
+endforeach()
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_test_cmake(PACKAGE_NAME BehaviorTreeV3)
diff --git a/ports/behaviortree-cpp/vcpkg.json b/ports/behaviortree-cpp/vcpkg.json new file mode 100644 index 000000000..f14ea22da --- /dev/null +++ b/ports/behaviortree-cpp/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "behaviortree-cpp", + "version-string": "3.5.1", + "description": "Behavior Trees Library in C++.", + "homepage": "https://www.behaviortree.dev", + "supports": "!uwp & !osx", + "dependencies": [ + "boost-coroutine2" + ] +} |
