From e507b6b7b24ea69f26ce19f5a7451bfcbb4ddbe0 Mon Sep 17 00:00:00 2001 From: Sean Yen Date: Fri, 7 Aug 2020 11:07:44 -0700 Subject: [PATCH] [ocoros-kdl] Fix the CMake config file (#12794) * Adding fix. * bump version. * Use string replacement. * Update CONTROL * Update portfile.cmake Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com> --- ports/orocos-kdl/CONTROL | 3 ++- ports/orocos-kdl/portfile.cmake | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/orocos-kdl/CONTROL b/ports/orocos-kdl/CONTROL index edef89076a3..1270962d769 100644 --- a/ports/orocos-kdl/CONTROL +++ b/ports/orocos-kdl/CONTROL @@ -1,5 +1,6 @@ Source: orocos-kdl -Version: 1.4-2 +Version: 1.4 +Port-Version: 3 Homepage: https://github.com/orocos/orocos_kinematics_dynamics Description: Kinematics and Dynamics Library Build-Depends: eigen3 diff --git a/ports/orocos-kdl/portfile.cmake b/ports/orocos-kdl/portfile.cmake index f0549d14522..8044d3ee9d4 100644 --- a/ports/orocos-kdl/portfile.cmake +++ b/ports/orocos-kdl/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO orocos/orocos_kinematics_dynamics @@ -20,6 +18,11 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/orocos_kdl/cmake TARGET_PATH share/orocos_kdl) +file(READ ${CURRENT_PACKAGES_DIR}/share/orocos_kdl/orocos_kdl-config.cmake _contents) +string(REPLACE "\${CMAKE_CURRENT_LIST_DIR}/../../.." "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") +string(REPLACE "\${_IMPORT_PREFIX}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/orocos_kdl/orocos_kdl-config.cmake "${_contents}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share