2024-08-29 00:26:09 -07:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
2020-05-12 00:44:34 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO osrf/sdformat
|
2022-07-11 23:18:21 +00:00
|
|
|
REF a978ade73e7b3509d378667dca394681e55ca068 #9.8.0
|
|
|
|
SHA512 958c0613da7c885f81cceee726da10574188e5edafb7d3aca680e40bbdca6ff1bc7b721ee1c56c53e3973960ae715912adfa6541cf3e35d32a5dc2ef2a997505
|
2020-05-12 00:44:34 +02:00
|
|
|
HEAD_REF sdf9
|
2020-06-05 03:20:25 +08:00
|
|
|
PATCHES
|
|
|
|
fix-dependency-urdfdom.patch
|
2022-01-21 20:00:19 +01:00
|
|
|
fix-quote.patch
|
|
|
|
no-absolute.patch
|
2022-03-08 16:58:51 -08:00
|
|
|
use-external-tinyxml-windows.patch
|
2020-05-12 00:44:34 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# Ruby is required by the sdformat build process
|
|
|
|
vcpkg_find_acquire_program(RUBY)
|
2022-07-11 23:18:21 +00:00
|
|
|
get_filename_component(RUBY_PATH "${RUBY}" DIRECTORY)
|
2020-05-12 00:44:34 +02:00
|
|
|
set(_path $ENV{PATH})
|
2021-12-29 05:24:18 +08:00
|
|
|
vcpkg_add_to_path("${RUBY_PATH}")
|
2020-05-12 00:44:34 +02:00
|
|
|
|
2021-12-29 05:24:18 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-05-12 00:44:34 +02:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
2022-01-08 06:47:34 +08:00
|
|
|
-DUSE_INTERNAL_URDF=OFF
|
2020-05-12 00:44:34 +02:00
|
|
|
)
|
|
|
|
|
2021-12-29 05:24:18 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-05-12 00:44:34 +02:00
|
|
|
|
|
|
|
# Restore original path
|
2024-03-11 20:39:47 -07:00
|
|
|
set(ENV{PATH} "${_path}")
|
2020-05-12 00:44:34 +02:00
|
|
|
|
|
|
|
# Fix cmake targets and pkg-config file location
|
2021-12-29 05:24:18 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sdformat9")
|
2020-05-12 00:44:34 +02:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
# Remove debug files
|
2021-12-29 05:24:18 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-05-12 00:44:34 +02:00
|
|
|
|
|
|
|
# Handle copyright
|
2024-08-29 00:26:09 -07:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|