Skip to content

Commit

Permalink
[anari] Update to 0.12.1 (#43188)
Browse files Browse the repository at this point in the history
Co-authored-by: JonLiu1993 <[email protected]>
  • Loading branch information
tarcila and JonLiu1993 authored Jan 23, 2025
1 parent d143977 commit 01be99f
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 13 deletions.
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 0a184fea1ab3afab72606d434d69cd3e171ae04d042fc6a425ba777c094af5a8225bb187a47176ac4afd6b2c57d0363f6e97e1f71b30137be09f26cc50590fac
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.1",
"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": "79e7c099f3d6cd450902494060357691f6fc3896",
"version": "0.12.1",
"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.1",
"port-version": 0
},
"anax": {
Expand Down

0 comments on commit 01be99f

Please sign in to comment.