From 4bd3a11e793dcdfa4bdbe3e04c8bd0546d9b247f Mon Sep 17 00:00:00 2001 From: Akash Date: Wed, 5 Jan 2022 20:21:10 -0600 Subject: [PATCH] [simbody] new port (#20565) * Add simbody port * Use newer vcpkg functions * Fix cmake config path for unix * Use patch file instead * Fix tools path for unix * Hard-code tools path * Add freeglut dep * Link to GLUT::GLUT * Don't build visualization * Fix static * Fix static * Update versions * Fail for uwp * Update baseline * Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Add !uwp to vcpkg.json * Fix static * Test simbody PR on CI * Try new ref * Fix hash * Fix osx * Fix * Update ref after upstream merge * Update ports/simbody/portfile.cmake Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> * Update version Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> --- ports/simbody/portfile.cmake | 37 ++++++++++++++++++++++++++++++++++++ ports/simbody/vcpkg.json | 19 ++++++++++++++++++ versions/baseline.json | 4 ++++ versions/s-/simbody.json | 9 +++++++++ 4 files changed, 69 insertions(+) create mode 100644 ports/simbody/portfile.cmake create mode 100644 ports/simbody/vcpkg.json create mode 100644 versions/s-/simbody.json diff --git a/ports/simbody/portfile.cmake b/ports/simbody/portfile.cmake new file mode 100644 index 00000000000000..cdd8f2927f5ebe --- /dev/null +++ b/ports/simbody/portfile.cmake @@ -0,0 +1,37 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO simbody/simbody + REF 040562785acd4b6d9d26ea6762d5c80075e0c474 + SHA512 b803ed45fbaa60c5af601ac2d0be2a109eae19428d72ab06952403e12116ee08592014d85accad8e6a64aed6bb0afbd6f9dff6588c4b22da65fd1bac067f8662 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBRARIES) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DYNAMIC_LIBRARIES) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_DYNAMIC_LIBRARIES=${BUILD_DYNAMIC_LIBRARIES} + -DBUILD_STATIC_LIBRARIES=${BUILD_STATIC_LIBRARIES} + -DWINDOWS_USE_EXTERNAL_LIBS=ON + -DINSTALL_DOCS=OFF + -DBUILD_VISUALIZER=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() + +if(WIN32) + vcpkg_cmake_config_fixup(CONFIG_PATH cmake) +else() + vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/simbody/vcpkg.json b/ports/simbody/vcpkg.json new file mode 100644 index 00000000000000..70822d07b426f3 --- /dev/null +++ b/ports/simbody/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "simbody", + "version-date": "2022-01-04", + "description": "High-performance C++ multibody dynamics/physics library for simulating articulated biomechanical and mechanical systems like vehicles, robots, and the human skeleton.", + "homepage": "https://simtk.org/home/simbody", + "supports": "!uwp", + "dependencies": [ + "blas", + "lapack", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 2f27fd009e4b9c..81848cbd7cc806 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6348,6 +6348,10 @@ "baseline": "1.8.1", "port-version": 3 }, + "simbody": { + "baseline": "2022-01-04", + "port-version": 0 + }, "simde": { "baseline": "0.7.2", "port-version": 0 diff --git a/versions/s-/simbody.json b/versions/s-/simbody.json new file mode 100644 index 00000000000000..6c2380d95a2b62 --- /dev/null +++ b/versions/s-/simbody.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "9474ba4a8027fb4f8e3e160decc4fa9f443a16e9", + "version-date": "2022-01-04", + "port-version": 0 + } + ] +}