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

[anari] Update to 0.12.0 #43188

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions ports/anari/anari-lib-maybe-static-lib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/anari/CMakeLists.txt b/src/anari/CMakeLists.txt
index 6a34153..ee572a1 100644
--- a/src/anari/CMakeLists.txt
+++ b/src/anari/CMakeLists.txt
@@ -51,7 +51,12 @@ project_compile_definitions(PRIVATE -Danari_EXPORTS)
## Create main shared + static library targets ##

project(anari)
-add_anari_frontend_library_target(SHARED)
+if(BUILD_SHARED_LIBS)
+ add_anari_frontend_library_target(SHARED)
+else()
+ add_anari_frontend_library_target(STATIC)
+ project_compile_definitions(PUBLIC -DANARI_STATIC_DEFINE)
+endif()

project(anari_static)
add_anari_frontend_library_target(STATIC)
28 changes: 17 additions & 11 deletions ports/anari/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/ANARI-SDK
REF "v${VERSION}"
SHA512 cf2c2e044b04d695e0a6c6c1abfb3495ea0996a018742ad3a6baccc6e0e3e9b83cb91b61eda8cf07e8f67f4beba24d07d927697a27606ae008a85fee9fa64fa8
HEAD_REF main
SHA512 978522469621694022be1a5425306832344a4b64ff5cc8fbb9267a683889d4624edd8a59b6488ecc6dcc8a851c74b92b6918470ad69c4d9363596f621688973d
HEAD_REF next_release
PATCHES anari-lib-maybe-static-lib.patch
)

vcpkg_find_acquire_program(PYTHON3)
Expand All @@ -15,9 +18,13 @@ vcpkg_cmake_configure(
OPTIONS
-DBUILD_CTS=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_HDANARI=OFF
-DBUILD_HELIDE_DEVICE=OFF
-DBUILD_REMOTE_DEVICE=OFF
-DBUILD_TESTING=OFF
-DBUILD_VIEWER=OFF
-DINSTALL_CODE_GEN_SCRIPTS=ON
-DINSTALL_VIEWER_LIBRARY=ON
)

vcpkg_cmake_install()
Expand All @@ -26,19 +33,18 @@ vcpkg_cmake_config_fixup(
)
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/share/anari/anariConfig.cmake"
" \${CMAKE_CURRENT_LIST_DIR}/../../../share/anari"
" \${CMAKE_CURRENT_LIST_DIR}/../../share/anari"
)

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/anari/code_gen/__pycache__"
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
endif()

vcpkg_install_copyright(
FILE_LIST "${SOURCE_PATH}/LICENSE"
)
2 changes: 1 addition & 1 deletion ports/anari/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anari",
"version": "0.10.0",
"version": "0.12.0",
"description": "Cross-Platform 3D Rendering Engine API.",
"homepage": "https://www.khronos.org/anari",
"license": "Apache-2.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/anari.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "10ea72740cb7c7d7efdec82fe4f846976d663933",
"version": "0.12.0",
"port-version": 0
},
{
"git-tree": "b547bbf12d56d4d9f189a14153d93e75c7aa3451",
"version": "0.10.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"port-version": 0
},
"anari": {
"baseline": "0.10.0",
"baseline": "0.12.0",
"port-version": 0
},
"anax": {
Expand Down