diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/simbody | |
Diffstat (limited to 'vcpkg/ports/simbody')
| -rw-r--r-- | vcpkg/ports/simbody/common-name-libs.patch | 84 | ||||
| -rw-r--r-- | vcpkg/ports/simbody/portfile.cmake | 43 | ||||
| -rw-r--r-- | vcpkg/ports/simbody/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/simbody/vcpkg.json | 21 |
4 files changed, 152 insertions, 0 deletions
diff --git a/vcpkg/ports/simbody/common-name-libs.patch b/vcpkg/ports/simbody/common-name-libs.patch new file mode 100644 index 0000000..52d4845 --- /dev/null +++ b/vcpkg/ports/simbody/common-name-libs.patch @@ -0,0 +1,84 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1995170..7ddb018 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -174,25 +174,25 @@ FORCE)
+
+
+ set(SimTKCOMMON_SHARED_LIBRARY ${SimTKCOMMON_LIBRARY_NAME})
+-set(SimTKCOMMON_STATIC_LIBRARY ${SimTKCOMMON_LIBRARY_NAME}_static)
++set(SimTKCOMMON_STATIC_LIBRARY ${SimTKCOMMON_LIBRARY_NAME})
+
+ set(SimTKCOMMON_LIBRARY_NAME_VN ${NS}SimTKcommon${VN})
+ set(SimTKCOMMON_SHARED_LIBRARY_VN ${SimTKCOMMON_LIBRARY_NAME_VN})
+-set(SimTKCOMMON_STATIC_LIBRARY_VN ${SimTKCOMMON_LIBRARY_NAME_VN}_static)
++set(SimTKCOMMON_STATIC_LIBRARY_VN ${SimTKCOMMON_LIBRARY_NAME_VN})
+
+ set(SimTKMATH_SHARED_LIBRARY ${SimTKMATH_LIBRARY_NAME})
+-set(SimTKMATH_STATIC_LIBRARY ${SimTKMATH_LIBRARY_NAME}_static)
++set(SimTKMATH_STATIC_LIBRARY ${SimTKMATH_LIBRARY_NAME})
+
+ set(SimTKMATH_LIBRARY_NAME_VN ${NS}SimTKmath${VN})
+ set(SimTKMATH_SHARED_LIBRARY_VN ${SimTKMATH_LIBRARY_NAME_VN})
+-set(SimTKMATH_STATIC_LIBRARY_VN ${SimTKMATH_LIBRARY_NAME_VN}_static)
++set(SimTKMATH_STATIC_LIBRARY_VN ${SimTKMATH_LIBRARY_NAME_VN})
+
+ set(SimTKSIMBODY_SHARED_LIBRARY ${SimTKSIMBODY_LIBRARY_NAME})
+-set(SimTKSIMBODY_STATIC_LIBRARY ${SimTKSIMBODY_LIBRARY_NAME}_static)
++set(SimTKSIMBODY_STATIC_LIBRARY ${SimTKSIMBODY_LIBRARY_NAME})
+
+ set(SimTKSIMBODY_LIBRARY_NAME_VN ${NS}SimTKsimbody${VN})
+ set(SimTKSIMBODY_SHARED_LIBRARY_VN ${SimTKSIMBODY_LIBRARY_NAME_VN})
+-set(SimTKSIMBODY_STATIC_LIBRARY_VN ${SimTKSIMBODY_LIBRARY_NAME_VN}_static)
++set(SimTKSIMBODY_STATIC_LIBRARY_VN ${SimTKSIMBODY_LIBRARY_NAME_VN})
+
+
+ # Caution: this variable is automatically created by the CMake
+diff --git a/SimTKcommon/CMakeLists.txt b/SimTKcommon/CMakeLists.txt
+index 47839f5..84ad865 100644
+--- a/SimTKcommon/CMakeLists.txt
++++ b/SimTKcommon/CMakeLists.txt
+@@ -86,9 +86,9 @@ endif(NEED_QUOTES)
+ # -DSimTKcommon_EXPORTS defined automatically when Windows DLL build is being done.
+
+ set(SHARED_TARGET ${SimTKCOMMON_LIBRARY_NAME})
+-set(STATIC_TARGET ${SimTKCOMMON_LIBRARY_NAME}_static)
++set(STATIC_TARGET ${SimTKCOMMON_LIBRARY_NAME})
+ set(SHARED_TARGET_VN ${SimTKCOMMON_LIBRARY_NAME}${VN})
+-set(STATIC_TARGET_VN ${SimTKCOMMON_LIBRARY_NAME}${VN}_static)
++set(STATIC_TARGET_VN ${SimTKCOMMON_LIBRARY_NAME}${VN})
+
+ ## Test against the unversioned libraries if they are being build;
+ ## otherwise against the versioned libraries.
+diff --git a/SimTKmath/CMakeLists.txt b/SimTKmath/CMakeLists.txt
+index f5c82ae..d3ee9bf 100644
+--- a/SimTKmath/CMakeLists.txt
++++ b/SimTKmath/CMakeLists.txt
+@@ -79,9 +79,9 @@ endif(NEED_QUOTES)
+ # -Dsimmath_EXPORTS defined automatically when Windows DLL build is being done.
+
+ set(SHARED_TARGET ${SimTKMATH_LIBRARY_NAME})
+-set(STATIC_TARGET ${SimTKMATH_LIBRARY_NAME}_static)
++set(STATIC_TARGET ${SimTKMATH_LIBRARY_NAME})
+ set(SHARED_TARGET_VN ${SimTKMATH_LIBRARY_NAME}${VN})
+-set(STATIC_TARGET_VN ${SimTKMATH_LIBRARY_NAME}${VN}_static)
++set(STATIC_TARGET_VN ${SimTKMATH_LIBRARY_NAME}${VN})
+
+ ## Test against the unversioned libraries if they are being built;
+ ## otherwise against the versioned libraries.
+diff --git a/Simbody/CMakeLists.txt b/Simbody/CMakeLists.txt
+index 062c2b9..e320f57 100644
+--- a/Simbody/CMakeLists.txt
++++ b/Simbody/CMakeLists.txt
+@@ -42,9 +42,9 @@ add_definitions(-DSimTK_SIMBODY_LIBRARY_NAME=${SimTKSIMBODY_LIBRARY_NAME}
+
+
+ set(SHARED_TARGET ${SimTKSIMBODY_LIBRARY_NAME})
+-set(STATIC_TARGET ${SimTKSIMBODY_LIBRARY_NAME}_static)
++set(STATIC_TARGET ${SimTKSIMBODY_LIBRARY_NAME})
+ set(SHARED_TARGET_VN ${SimTKSIMBODY_LIBRARY_NAME}${VN})
+-set(STATIC_TARGET_VN ${SimTKSIMBODY_LIBRARY_NAME}${VN}_static)
++set(STATIC_TARGET_VN ${SimTKSIMBODY_LIBRARY_NAME}${VN})
+
+ ## Test against the unversioned libraries if they are being built;
+ ## otherwise against the versioned libraries.
diff --git a/vcpkg/ports/simbody/portfile.cmake b/vcpkg/ports/simbody/portfile.cmake new file mode 100644 index 0000000..ce98c74 --- /dev/null +++ b/vcpkg/ports/simbody/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO simbody/simbody
+ REF 462b2a6dbb8794db2922d72f52b29b488a178ebc
+ SHA512 e2b1837e0a04461ebc94e80f5e8aa29f874a1113383db8b24e77b0c9413c4a6bab0299c6a9b2f07147e82ef01a765fed6d6455d5bd059882c646830dd8d1b224
+ HEAD_REF master
+ PATCHES
+ common-name-libs.patch
+)
+
+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
+ -DBUILD_TESTS_AND_EXAMPLES_STATIC=OFF
+ -DBUILD_TESTS_AND_EXAMPLES_SHARED=OFF
+)
+
+vcpkg_cmake_install()
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ 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")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc")
+
+vcpkg_fixup_pkgconfig()
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/simbody/usage b/vcpkg/ports/simbody/usage new file mode 100644 index 0000000..eb8d5d8 --- /dev/null +++ b/vcpkg/ports/simbody/usage @@ -0,0 +1,4 @@ +Simbody provides CMake targets: + + find_package(Simbody CONFIG REQUIRED) + target_link_libraries(main PRIVATE SimTKcommon SimTKmath SimTKsimbody) diff --git a/vcpkg/ports/simbody/vcpkg.json b/vcpkg/ports/simbody/vcpkg.json new file mode 100644 index 0000000..fd36c4d --- /dev/null +++ b/vcpkg/ports/simbody/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "simbody", + "version-date": "2023-01-10", + "port-version": 1, + "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", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + "blas", + "lapack", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |