aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/rerun-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/rerun-sdk')
-rw-r--r--vcpkg/ports/rerun-sdk/portfile.cmake56
-rw-r--r--vcpkg/ports/rerun-sdk/usage4
-rw-r--r--vcpkg/ports/rerun-sdk/vcpkg.json19
3 files changed, 79 insertions, 0 deletions
diff --git a/vcpkg/ports/rerun-sdk/portfile.cmake b/vcpkg/ports/rerun-sdk/portfile.cmake
new file mode 100644
index 0000000..fed2f3f
--- /dev/null
+++ b/vcpkg/ports/rerun-sdk/portfile.cmake
@@ -0,0 +1,56 @@
+# Must download SDK distfile because some binaries are prebuilt from Rust.
+vcpkg_download_distfile(
+ ARCHIVE
+ URLS "https://github.com/rerun-io/rerun/releases/download/${VERSION}/rerun_cpp_sdk.zip"
+ FILENAME "rerun_cpp_sdk_${VERSION}.zip"
+ SHA512 2568e587ab4d0a430a31e59da89c106a5560627525aef69825443cc262a410db95f6012b749c27f33b77ac61cbd5322cda93234ef08b589798ce5f24c7d9a40e
+)
+
+# Workaround: The distributed SDK contains a prebuilt rerun_c that is built in Release mode. On Windows, this means
+# that it always links to the release MSVC C runtime (CRT) and causes vcpkg's post-build CRT linkage check to fail for
+# Debug builds. As such, this post-build check is suppressed for Windows builds.
+if(VCPKG_TARGET_IS_WINDOWS)
+ # TODO: Remove this policy when rerun ships a Debug rerun_c.
+ set(VCPKG_POLICY_SKIP_CRT_LINKAGE_CHECK enabled)
+endif()
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DRERUN_DOWNLOAD_AND_BUILD_ARROW=OFF # Disable downloading and building Arrow
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME rerun_sdk CONFIG_PATH "lib/cmake/rerun_sdk")
+
+file(GLOB LIBRERUN_C_FILE
+ RELATIVE "${CURRENT_PACKAGES_DIR}/lib"
+ "${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}rerunc_c_-*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
+)
+
+vcpkg_replace_string(
+ "${CURRENT_PACKAGES_DIR}/share/rerun_sdk/rerun_sdkConfig.cmake"
+ "set(RERUN_LIB_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../..\")"
+ "set(RERUN_LIB_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../lib\")"
+)
+
+vcpkg_replace_string(
+ "${CURRENT_PACKAGES_DIR}/share/rerun_sdk/rerun_sdkConfig.cmake"
+ "${SOURCE_PATH}/lib/${LIBRERUN_C_FILE}"
+ "\${CMAKE_CURRENT_LIST_DIR}/../../lib/${LIBRERUN_C_FILE}"
+)
+
+vcpkg_install_copyright(FILE_LIST
+ "${SOURCE_PATH}/LICENSE-MIT"
+ "${SOURCE_PATH}/LICENSE-APACHE"
+)
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
diff --git a/vcpkg/ports/rerun-sdk/usage b/vcpkg/ports/rerun-sdk/usage
new file mode 100644
index 0000000..4b9c474
--- /dev/null
+++ b/vcpkg/ports/rerun-sdk/usage
@@ -0,0 +1,4 @@
+rerun-sdk provides CMake targets:
+
+ find_package(rerun_sdk CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE rerun_sdk)
diff --git a/vcpkg/ports/rerun-sdk/vcpkg.json b/vcpkg/ports/rerun-sdk/vcpkg.json
new file mode 100644
index 0000000..cd0f5dd
--- /dev/null
+++ b/vcpkg/ports/rerun-sdk/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "rerun-sdk",
+ "version": "0.26.2",
+ "description": "Open source log handling and visualization for spatial and embodied AI. Managed infrastructure to ingest, store, analyze, and stream data at scale with built-in visual debugging. Fast, flexible, and easy to use.",
+ "homepage": "https://rerun.io",
+ "license": "MIT OR Apache-2.0",
+ "supports": "(windows & x64) | osx | linux",
+ "dependencies": [
+ "arrow",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}