mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 08:49:10 +08:00
[dartsim] Add new port (#13320)
* [dartsim] Add new port * Update vcpkg.json * Update vcpkg.json * Update vcpkg.json
This commit is contained in:
parent
47c0b1ce40
commit
f1bef4aa7c
25
ports/dartsim/1478.patch
Normal file
25
ports/dartsim/1478.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 6d03ee61c38e2b07b2dbb85f0ba61d2a76956e3b Mon Sep 17 00:00:00 2001
|
||||
From: Steve Peters <scpeters@openrobotics.org>
|
||||
Date: Fri, 24 Jul 2020 17:24:42 -0700
|
||||
Subject: [PATCH] Don't force CMAKE_INSTALL_PREFIX on windows
|
||||
|
||||
Fixes #1477.
|
||||
|
||||
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6552bedc162..47df721559b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -51,7 +51,7 @@ initialize_component_helpers(${PROJECT_NAME})
|
||||
|
||||
# System install paths on Windows
|
||||
if(WIN32)
|
||||
- set(CMAKE_INSTALL_PREFIX "C:/Golems" CACHE PATH "Install prefix" FORCE)
|
||||
+ set(CMAKE_INSTALL_PREFIX "C:/Golems" CACHE PATH "Install prefix")
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
50
ports/dartsim/1497.patch
Normal file
50
ports/dartsim/1497.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 9fde9124927789ca2399f99c1be9b101ed1e8550 Mon Sep 17 00:00:00 2001
|
||||
From: Silvio Traversaro <silvio.traversaro@iit.it>
|
||||
Date: Thu, 3 Sep 2020 17:28:01 +0200
|
||||
Subject: [PATCH] CMake: Add DART_SKIP_<dep> advanced option
|
||||
|
||||
Add DART_SKIP_<dep> option to permit to specify that
|
||||
a dependecy should not used even if it is found in the system.
|
||||
---
|
||||
cmake/DARTMacros.cmake | 21 ++++++++++++++-------
|
||||
1 file changed, 14 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/cmake/DARTMacros.cmake b/cmake/DARTMacros.cmake
|
||||
index 8b1a89292ee..409b02bd742 100644
|
||||
--- a/cmake/DARTMacros.cmake
|
||||
+++ b/cmake/DARTMacros.cmake
|
||||
@@ -127,7 +127,9 @@ endfunction()
|
||||
|
||||
#===============================================================================
|
||||
macro(dart_check_optional_package variable component dependency)
|
||||
- if(${${variable}_FOUND})
|
||||
+ option(DART_SKIP_${variable} "If ON, do not use ${variable} even if it is found." OFF)
|
||||
+ mark_as_advanced(DART_SKIP_${variable})
|
||||
+ if(${${variable}_FOUND} AND NOT ${DART_SKIP_${variable}})
|
||||
set(HAVE_${variable} TRUE CACHE BOOL "Check if ${variable} found." FORCE)
|
||||
if(DART_VERBOSE)
|
||||
message(STATUS "Looking for ${dependency} - version ${${variable}_VERSION}"
|
||||
@@ -135,12 +137,17 @@ macro(dart_check_optional_package variable component dependency)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_${variable} FALSE CACHE BOOL "Check if ${variable} found." FORCE)
|
||||
- if(ARGV3) # version
|
||||
- message(STATUS "Looking for ${dependency} - NOT found, to use"
|
||||
- " ${component}, please install ${dependency} (>= ${ARGV3})")
|
||||
- else()
|
||||
- message(STATUS "Looking for ${dependency} - NOT found, to use"
|
||||
- " ${component}, please install ${dependency}")
|
||||
+ if(NOT ${${variable}_FOUND})
|
||||
+ if(ARGV3) # version
|
||||
+ message(STATUS "Looking for ${dependency} - NOT found, to use"
|
||||
+ " ${component}, please install ${dependency} (>= ${ARGV3})")
|
||||
+ else()
|
||||
+ message(STATUS "Looking for ${dependency} - NOT found, to use"
|
||||
+ " ${component}, please install ${dependency}")
|
||||
+ endif()
|
||||
+ elseif(${DART_SKIP_${variable}} AND DART_VERBOSE)
|
||||
+ message(STATUS "Not using ${dependency} - version ${${variable}_VERSION}"
|
||||
+ " even if found because DART_SKIP_${variable} is ON.")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
40
ports/dartsim/portfile.cmake
Normal file
40
ports/dartsim/portfile.cmake
Normal file
@ -0,0 +1,40 @@
|
||||
# Shared library support is broken upstream (https://github.com/dartsim/dart/issues/1005#issuecomment-375406260)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO dartsim/dart
|
||||
REF v6.9.4
|
||||
SHA512 a9e8712a294286772ee1e3c3899aac7d202f1d3c2b9242ebeaddb2a142787b192d5421a6e3f889dd9ff9ca9e9106b1f893a0c8ab2e1656b04fac6d0be13494ba
|
||||
HEAD_REF release-6.9
|
||||
PATCHES 1478.patch
|
||||
1497.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DDART_VERBOSE=ON
|
||||
-DDART_MSVC_DEFAULT_OPTIONS=ON
|
||||
-DDART_SKIP_DOXYGEN=ON
|
||||
-DDART_SKIP_FLANN=ON
|
||||
-DDART_SKIP_IPOPT=ON
|
||||
-DDART_SKIP_NLOPT=ON
|
||||
-DDART_SKIP_OPENGL=ON
|
||||
-DDART_SKIP_pagmo=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/dart/cmake TARGET_PATH share/dart)
|
||||
|
||||
# Remove pkg-config file as they are broken upstream (https://github.com/dartsim/dart/issues/1496)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/dartsim RENAME copyright)
|
||||
|
25
ports/dartsim/vcpkg.json
Normal file
25
ports/dartsim/vcpkg.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "dartsim",
|
||||
"version-string": "9.4.0",
|
||||
"description": "Dynamic Animation and Robotics Toolkit",
|
||||
"homepage": "https://dartsim.github.io/",
|
||||
"dependencies": [
|
||||
"assimp",
|
||||
"boost-algorithm",
|
||||
"boost-filesystem",
|
||||
"boost-functional",
|
||||
"boost-lexical-cast",
|
||||
"boost-math",
|
||||
"boost-optional",
|
||||
"boost-regex",
|
||||
"boost-system",
|
||||
"bullet3",
|
||||
"ccd",
|
||||
"eigen3",
|
||||
"fcl",
|
||||
"octomap",
|
||||
"ode",
|
||||
"tinyxml2",
|
||||
"urdfdom"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user