diff options
| author | Silvio Traversaro <silvio.traversaro@iit.it> | 2019-09-13 19:45:57 +0200 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-09-13 10:45:56 -0700 |
| commit | 51b20ded1c67a066bbd63453ec43f597d58fa3c6 (patch) | |
| tree | ccda6afca602b9319a8cc96236724298f70195cd | |
| parent | 8887f6c09c27dd5f6dfeecc4c766ec9f67d95f7a (diff) | |
| download | vcpkg-51b20ded1c67a066bbd63453ec43f597d58fa3c6.tar.gz vcpkg-51b20ded1c67a066bbd63453ec43f597d58fa3c6.zip | |
[sdformat6] Add new port 🤖 (#8137)
* [sdformat6] Add new port
Add new port for the sdformat library (http://sdformat.org/).
| -rw-r--r-- | ports/sdformat6/CONTROL | 5 | ||||
| -rw-r--r-- | ports/sdformat6/portfile.cmake | 55 |
2 files changed, 60 insertions, 0 deletions
diff --git a/ports/sdformat6/CONTROL b/ports/sdformat6/CONTROL new file mode 100644 index 000000000..5733c129d --- /dev/null +++ b/ports/sdformat6/CONTROL @@ -0,0 +1,5 @@ +Source: sdformat6 +Version: 6.2.0 +Homepage: http://sdformat.org/ +Build-Depends: boost-any, boost-variant, ignition-math4, urdfdom, tinyxml +Description: Simulation Description Format (SDF) parser and description files. diff --git a/ports/sdformat6/portfile.cmake b/ports/sdformat6/portfile.cmake new file mode 100644 index 000000000..39e4e5bb0 --- /dev/null +++ b/ports/sdformat6/portfile.cmake @@ -0,0 +1,55 @@ +include(vcpkg_common_functions) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/sdformat + REF sdformat6_6.2.0 + SHA512 3e3934010438bffbf10c1df29bd486c098e3c1bdf2b0349b69a53fb6f4d2bd3b3c8c4b4a8dfb413da13a638c0794f41c1bff4adb11a889b1552d90ba8b94c495 + HEAD_REF sdf6 +) + +# Ruby is required by the sdformat build process +vcpkg_find_acquire_program(RUBY) +get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) +set(_path $ENV{PATH}) +vcpkg_add_to_path(${RUBY_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF + -DUSE_EXTERNAL_URDF=ON + -DUSE_EXTERNAL_TINYXML=ON +) + +vcpkg_install_cmake() + +# Restore original path +set(ENV{PATH} ${_path}) + +# Move location of sdformat.dll from lib to bin +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll + ${CURRENT_PACKAGES_DIR}/bin/sdformat.dll) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll) +endif() + +# Fix cmake targets location +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat") + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdformat6 RENAME copyright) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME SDFormat) |
