From 140e2733f7fd2e6db5fe57834db3bdb3485d8236 Mon Sep 17 00:00:00 2001 From: markdegreef Date: Tue, 5 Mar 2019 19:44:01 +0100 Subject: Fix linux build of urdfdom (#5538) Remove empty directories and set correct cmake target path Machine setup: ubuntu 18.10 x64 gcc version 8.2.0 The steps to reproduce: ./vcpkg install urdfdom:x64-linux --- ports/console-bridge/portfile.cmake | 2 ++ ports/urdfdom-headers/portfile.cmake | 12 ++++++++++-- ports/urdfdom/portfile.cmake | 8 +++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index 74d76923f..dc618b4b9 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -25,6 +25,8 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/console_bridge) else() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/console_bridge/cmake" TARGET_PATH share/console_bridge) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/console_bridge) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake index 7d11936ec..4a9d3d8c1 100644 --- a/ports/urdfdom-headers/portfile.cmake +++ b/ports/urdfdom-headers/portfile.cmake @@ -15,10 +15,18 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/urdfdom_headers) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/urdfdom_headers/cmake" TARGET_PATH share/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom_headers) +endif() # The config files for this project use underscore -file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) diff --git a/ports/urdfdom/portfile.cmake b/ports/urdfdom/portfile.cmake index bf0568f8c..530b586e5 100644 --- a/ports/urdfdom/portfile.cmake +++ b/ports/urdfdom/portfile.cmake @@ -28,7 +28,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/urdfdom) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/urdfdom/cmake" TARGET_PATH share/urdfdom) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -- cgit v1.2.3