aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhoebe <20694052+PhoebeHui@users.noreply.github.com>2020-10-28 04:18:00 +0800
committerGitHub <noreply@github.com>2020-10-27 13:18:00 -0700
commit18f84f2fb986e3a3d8d37d868168b202eef0e45f (patch)
treef2254807a7d0e7dad75a8cdda9567b880203a485
parent44842bfd6a57a361f69db4c36c6a48d6ddb75e4f (diff)
downloadvcpkg-18f84f2fb986e3a3d8d37d868168b202eef0e45f.tar.gz
vcpkg-18f84f2fb986e3a3d8d37d868168b202eef0e45f.zip
[ompl] Fix dependency issue (#14250)
-rw-r--r--ports/ompl/CONTROL1
-rw-r--r--ports/ompl/fix_dependency.patch32
-rw-r--r--ports/ompl/portfile.cmake4
3 files changed, 37 insertions, 0 deletions
diff --git a/ports/ompl/CONTROL b/ports/ompl/CONTROL
index c82008ed6..b18ba5381 100644
--- a/ports/ompl/CONTROL
+++ b/ports/ompl/CONTROL
@@ -1,5 +1,6 @@
Source: ompl
Version: 1.5.0
+Port-Version: 1
Homepage: https://bitbucket.org/ompl
Description: The Open Motion Planning Library, consists of many state-of-the-art sampling-based motion planning algorithms
Build-Depends: boost-dynamic-bitset, boost-filesystem, boost-graph, boost-odeint, boost-program-options, boost-serialization, boost-system, boost-test, boost-ublas, boost-timer, eigen3
diff --git a/ports/ompl/fix_dependency.patch b/ports/ompl/fix_dependency.patch
new file mode 100644
index 000000000..6ab6f7137
--- /dev/null
+++ b/ports/ompl/fix_dependency.patch
@@ -0,0 +1,32 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 24be873..3b916d7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -136,7 +136,7 @@ find_package(Drawstuff QUIET)
+ set_package_properties(assimp PROPERTIES
+ URL "http://assimp.org"
+ PURPOSE "Used in ompl_app for reading meshes representing robots and environments.")
+-find_package(assimp REQUIRED)
++find_package(assimp CONFIG REQUIRED)
+ set_package_properties(ccd PROPERTIES
+ URL "https://github.com/danfis/libccd"
+ PURPOSE "Collision detection library used by fcl.")
+@@ -178,8 +178,7 @@ include_directories(
+ "${OMPLAPP_INCLUDE_DIRS}"
+ "${OMPL_INCLUDE_DIRS}"
+ "${EIGEN3_INCLUDE_DIR}"
+- "${FCL_INCLUDE_DIRS}"
+- "${ASSIMP_INCLUDE_DIRS}")
++ "${FCL_INCLUDE_DIRS}")
+
+ # ROS installs fcl in /usr. In /usr/include/fcl/config.h it says octomap was
+ # enabled. Octomap is installed in /opt/ros/${ROS_DISTRO}/include (most
+@@ -199,7 +198,7 @@ set(OMPLAPP_LIBRARIES
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${OPENGL_LIBRARIES}
+- ${ASSIMP_LIBRARIES}
++ assimp::assimp
+ ${FCL_LIBRARIES})
+ link_directories(${ASSIMP_LIBRARY_DIRS} ${CCD_LIBRARY_DIRS} ${OCTOMAP_LIBRARY_DIRS} ${FCL_LIBRARY_DIRS})
+
diff --git a/ports/ompl/portfile.cmake b/ports/ompl/portfile.cmake
index 3dab51fcd..fa2379bfa 100644
--- a/ports/ompl/portfile.cmake
+++ b/ports/ompl/portfile.cmake
@@ -2,12 +2,15 @@ vcpkg_buildpath_length_warning(37)
set(OMPL_VERSION 1.5.0)
+set(FEATURE_PATCHES)
+
if("app" IN_LIST FEATURES)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/ompl/omplapp/releases/download/1.5.0/omplapp-1.5.0-Source.tar.gz"
FILENAME "omplapp-${OMPL_VERSION}.tar.gz"
SHA512 ad221b67146915cb63be6731ca2fa7d827d85b7fd175d87ee64c799311dfe4878935881b1ae6447357fdd178f70c9aa01b178e857261a8d8769affa1e58ed72b
)
+ list(APPEND FEATURE_PATCHES fix_dependency.patch)
else()
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/ompl/ompl/archive/1.5.0.tar.gz"
@@ -20,6 +23,7 @@ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${OMPL_VERSION}
+ PATCHES ${FEATURE_PATCHES}
)
# Based on selected features different files get downloaded, so use the following command instead of patch.