Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install c/sdk_info.h public header #16

Merged
merged 16 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci_support/osx_64_libarrow14.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.13'
- '10.15'
MACOSX_SDK_VERSION:
- '11.0'
c_compiler:
Expand All @@ -9,7 +9,7 @@ c_compiler_version:
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
- '10.13'
- '10.15'
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_64_libarrow15.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.13'
- '10.15'
MACOSX_SDK_VERSION:
- '11.0'
c_compiler:
Expand All @@ -9,7 +9,7 @@ c_compiler_version:
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
- '10.13'
- '10.15'
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_64_libarrow16.1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.13'
- '10.15'
MACOSX_SDK_VERSION:
- '11.0'
c_compiler:
Expand All @@ -9,7 +9,7 @@ c_compiler_version:
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
- '10.13'
- '10.15'
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_64_libarrow17.0.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.13'
- '10.15'
MACOSX_SDK_VERSION:
- '11.0'
c_compiler:
Expand All @@ -9,7 +9,7 @@ c_compiler_version:
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
- '10.13'
- '10.15'
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_arm64_libarrow14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION:
c_compiler:
- clang
c_compiler_version:
- '17'
- '16'
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
Expand All @@ -17,7 +17,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '17'
- '16'
libarrow:
- '14'
macos_machine:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_arm64_libarrow15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION:
c_compiler:
- clang
c_compiler_version:
- '17'
- '16'
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
Expand All @@ -17,7 +17,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '17'
- '16'
libarrow:
- '15'
macos_machine:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_arm64_libarrow16.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION:
c_compiler:
- clang
c_compiler_version:
- '17'
- '16'
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
Expand All @@ -17,7 +17,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '17'
- '16'
libarrow:
- '16.1'
macos_machine:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_arm64_libarrow17.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION:
c_compiler:
- clang
c_compiler_version:
- '17'
- '16'
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
Expand All @@ -17,7 +17,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '17'
- '16'
libarrow:
- '17.0'
macos_machine:
Expand Down
1 change: 1 addition & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions recipe/7246.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 777afbdcedba732c6a2d54ccfdff08f22eaf1403 Mon Sep 17 00:00:00 2001
From: Silvio <silvio.traversaro@iit.it>
Date: Tue, 20 Aug 2024 19:13:15 +0200
Subject: [PATCH] Install sdk_info.h even if RERUN_INSTALL_RERUN_C option is
OFF

---
rerun_cpp/CMakeLists.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/rerun_cpp/CMakeLists.txt b/rerun_cpp/CMakeLists.txt
index fc4c8160588f..f20b52ed4975 100644
--- a/rerun_cpp/CMakeLists.txt
+++ b/rerun_cpp/CMakeLists.txt
@@ -153,8 +153,12 @@ install(TARGETS rerun_sdk
INCLUDES DESTINATION include
)

+# Some public headers are shared by both the C++ and C sdk, so we install
+# them with the C++ headers also if RERUN_INSTALL_RERUN_C is OFF
+set(RERUN_PATTERN_HEADER_SHARED_BETWEEN_CXX_AND_C "sdk_info.h")
+
# Add all C++ headers to the install.
-install(DIRECTORY "${RERUN_CPP_SOURCE_DIR}/" TYPE INCLUDE FILES_MATCHING PATTERN "*.hpp")
+install(DIRECTORY "${RERUN_CPP_SOURCE_DIR}/" TYPE INCLUDE FILES_MATCHING PATTERN "*.hpp" PATTERN ${RERUN_PATTERN_HEADER_SHARED_BETWEEN_CXX_AND_C})

option(RERUN_INSTALL_RERUN_C "Install rerun_c file." ON)

@@ -168,7 +172,7 @@ endif()
if(RERUN_INSTALL_RERUN_C)
# CMake doesn't allow installing imported targets which is why we need to add this as a file.
get_target_property(RERUN_C_LIB_LOCATION rerun_c IMPORTED_LOCATION)
- install(DIRECTORY "${RERUN_CPP_SOURCE_DIR}/" TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY "${RERUN_CPP_SOURCE_DIR}/" TYPE INCLUDE FILES_MATCHING PATTERN "*.h" PATTERN ${RERUN_PATTERN_HEADER_SHARED_BETWEEN_CXX_AND_C} EXCLUDE)
install(FILES ${RERUN_C_LIB_LOCATION} DESTINATION lib)
endif()

4 changes: 4 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
MACOSX_SDK_VERSION: # [osx and x86_64]
- "11.0" # [osx and x86_64]

# Needed to use std::filesystem in osx
c_stdlib_version: # [osx and x86_64]
- '10.15' # [osx and x86_64]

# Workaround for https://github.com/rerun-io/rerun/issues/7216
# Use the same version specified in https://github.com/rerun-io/rerun/blob/0.18.0/rust-toolchain#L8
rust_compiler_version:
Expand Down
8 changes: 7 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ package:
source:
url: https://github.com/rerun-io/rerun/archive/refs/tags/{{ version }}.tar.gz
sha256: 5ebfd05c54e44ae864c9125bab9f846f780412c9e7a3645c6b617f922304c545
patches:
- 7246.patch

build:
number: 0
number: 1
run_exports:
- {{ pin_subpackage(name, max_pin='x.x.x') }}

Expand Down Expand Up @@ -44,6 +46,10 @@ test:
- cmake-package-check
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
source_files:
- examples/cpp

about:
home: https://www.rerun.io/
Expand Down
10 changes: 10 additions & 0 deletions recipe/run_test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
setlocal EnableDelayedExpansion

cd examples\cpp\minimal

:: Compile example that links rerun
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DRERUN_FIND_PACKAGE:BOOL=ON .
if errorlevel 1 exit 1

cmake --build . --config Release
if errorlevel 1 exit 1
9 changes: 9 additions & 0 deletions recipe/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -e

# Test linking against the rerun library
cd examples/cpp/minimal

# Compile example that links assimp
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DRERUN_FIND_PACKAGE:BOOL=ON .

cmake --build . --config Release