diff --git a/ports/anari/anari-lib-maybe-static-lib.patch b/ports/anari/anari-lib-maybe-static-lib.patch new file mode 100644 index 00000000000000..a54337eeec9c7e --- /dev/null +++ b/ports/anari/anari-lib-maybe-static-lib.patch @@ -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) diff --git a/ports/anari/portfile.cmake b/ports/anari/portfile.cmake index baa13fd6c9d601..1a7348dd158f8f 100644 --- a/ports/anari/portfile.cmake +++ b/ports/anari/portfile.cmake @@ -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) @@ -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() @@ -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" ) diff --git a/ports/anari/vcpkg.json b/ports/anari/vcpkg.json index d4610b6e4b32df..51f7768ad2ef9b 100644 --- a/ports/anari/vcpkg.json +++ b/ports/anari/vcpkg.json @@ -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", diff --git a/versions/a-/anari.json b/versions/a-/anari.json index b4c87822244e2b..6c403d4f324c08 100644 --- a/versions/a-/anari.json +++ b/versions/a-/anari.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "79e7c099f3d6cd450902494060357691f6fc3896", + "version": "0.12.1", + "port-version": 0 + }, { "git-tree": "b547bbf12d56d4d9f189a14153d93e75c7aa3451", "version": "0.10.0", diff --git a/versions/baseline.json b/versions/baseline.json index b528e477b63a91..59e87fd58aa92d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -121,7 +121,7 @@ "port-version": 0 }, "anari": { - "baseline": "0.10.0", + "baseline": "0.12.1", "port-version": 0 }, "anax": {