2020-09-15 02:13:33 +02:00
|
|
|
# Shared library support is broken upstream (https://github.com/dartsim/dart/issues/1005#issuecomment-375406260)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO dartsim/dart
|
2023-11-08 20:12:24 +02:00
|
|
|
REF v${VERSION}
|
2022-08-06 08:09:54 +02:00
|
|
|
SHA512 6d04da37d0eb40a35a3aaec583af024e2edf71d68bb38b6832760de21a349221387644ed9be0cc1e451c669bbf48eb53d8d0cd3be1b1b265a30be2aa17c7e48b
|
2021-10-07 14:39:57 -05:00
|
|
|
HEAD_REF main
|
2021-04-26 10:27:45 -07:00
|
|
|
PATCHES
|
|
|
|
disable_unit_tests_examples_and_tutorials.patch
|
2023-11-08 20:12:24 +02:00
|
|
|
fix-pc-dependencies.patch
|
2020-09-15 02:13:33 +02:00
|
|
|
)
|
|
|
|
|
2021-10-07 14:39:57 -05:00
|
|
|
vcpkg_cmake_configure(
|
2021-11-23 00:47:29 +01:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-04-26 10:27:45 -07:00
|
|
|
OPTIONS
|
|
|
|
-DDART_VERBOSE=ON
|
|
|
|
-DDART_MSVC_DEFAULT_OPTIONS=ON
|
|
|
|
-DDART_SKIP_DOXYGEN=ON
|
|
|
|
-DDART_SKIP_FLANN=ON
|
|
|
|
-DDART_SKIP_IPOPT=ON
|
|
|
|
-DDART_SKIP_NLOPT=ON
|
|
|
|
-DDART_SKIP_pagmo=ON
|
2022-08-06 08:09:54 +02:00
|
|
|
-Durdfdom_headers_VERSION_MAJOR=1 # urdfdom-headers does not expose a header macro for its version.
|
|
|
|
-Durdfdom_headers_VERSION_MINOR=0 # versions of at least 1.0.0 use std:: constructs in their ABI instead of boost:: ones.
|
|
|
|
-Durdfdom_headers_VERSION_PATCH=0
|
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
DART_MSVC_DEFAULT_OPTIONS
|
2020-09-15 02:13:33 +02:00
|
|
|
)
|
|
|
|
|
2021-10-07 14:39:57 -05:00
|
|
|
vcpkg_cmake_install()
|
2020-09-15 02:13:33 +02:00
|
|
|
|
2021-10-07 14:39:57 -05:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/dart/cmake PACKAGE_NAME dart)
|
2020-09-15 02:13:33 +02:00
|
|
|
|
2021-11-23 00:47:29 +01:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
# only used for tests and examples (we removed the examples in share/doc above):
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dart/config.hpp" "#define DART_ROOT_PATH \"${SOURCE_PATH}/\"" "")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dart/config.hpp" "#define DART_DATA_PATH \"${SOURCE_PATH}/data/\"" "")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dart/config.hpp" "#define DART_DATA_LOCAL_PATH \"${SOURCE_PATH}/data/\"" "")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dart/config.hpp" "#define DART_DATA_GLOBAL_PATH \"${CURRENT_PACKAGES_DIR}/share/doc/dart/data/\"" "")
|
2020-09-15 02:13:33 +02:00
|
|
|
|
|
|
|
# Handle copyright
|
2021-11-23 00:47:29 +01:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|