diff --git a/cmake/Dependencies.aarch64-linux.cmake b/cmake/Dependencies.aarch64-linux.cmake index b0835c0951..be12a62ad5 100644 --- a/cmake/Dependencies.aarch64-linux.cmake +++ b/cmake/Dependencies.aarch64-linux.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -78,14 +78,10 @@ set(Protobuf_USE_STATIC_LIBS YES) # deliberatelly use protobuf instead of Protobuf to use protobuf provided cmake configuration file # then use Protobuf to utilize our FindProtobuf.cmake to discover the rest find_package(protobuf REQUIRED CONFIG) -find_package(Protobuf 2.0 REQUIRED) -if(${Protobuf_VERSION} VERSION_LESS "3.0") - message(STATUS "TensorFlow TFRecord file format support is not available with Protobuf 2") -else() - message(STATUS "Enabling TensorFlow TFRecord file format support") - add_definitions(-DDALI_BUILD_PROTO3=1) - set(BUILD_PROTO3 ON CACHE STRING "Build proto3") -endif() +find_package(Protobuf 3.6.1 REQUIRED) +message(STATUS "Enabling TensorFlow TFRecord file format support") +add_definitions(-DDALI_BUILD_PROTO3=1) +set(BUILD_PROTO3 ON CACHE STRING "Build proto3") include_directories(SYSTEM ${Protobuf_INCLUDE_DIRS}) list(APPEND DALI_LIBS protobuf::libprotobuf) diff --git a/cmake/Dependencies.aarch64-qnx.cmake b/cmake/Dependencies.aarch64-qnx.cmake index b9ac298ab9..33e28e0aa7 100644 --- a/cmake/Dependencies.aarch64-qnx.cmake +++ b/cmake/Dependencies.aarch64-qnx.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2019, 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2019, 2021, 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -82,14 +82,10 @@ include(cmake/Dependencies.common.cmake) ################################################################## set(Protobuf_CROSS YES) set(Protobuf_USE_STATIC_LIBS YES) -find_package(Protobuf 2.0 REQUIRED) -if(${Protobuf_VERSION} VERSION_LESS "3.0") - message(STATUS "TensorFlow TFRecord file format support is not available with Protobuf 2") -else() - message(STATUS "Enabling TensorFlow TFRecord file format support") - add_definitions(-DDALI_BUILD_PROTO3=1) - set(BUILD_PROTO3 ON CACHE STRING "Build proto3") -endif() +find_package(Protobuf 3.6.1 REQUIRED) +message(STATUS "Enabling TensorFlow TFRecord file format support") +add_definitions(-DDALI_BUILD_PROTO3=1) +set(BUILD_PROTO3 ON CACHE STRING "Build proto3") include_directories(SYSTEM ${Protobuf_INCLUDE_DIRS}) set(DALI_SYSTEM_LIBS "") diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index ccb88599e3..01f3d3549f 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2019, 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2017-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -118,14 +118,10 @@ if (BUILD_PROTOBUF) # deliberatelly use protobuf instead of Protobuf to use protobuf provided cmake configuration file # then use Protobuf to utilize our FindProtobuf.cmake to discover the rest find_package(protobuf REQUIRED CONFIG) - find_package(Protobuf 2.0 REQUIRED) - if(${Protobuf_VERSION} VERSION_LESS "3.0") - message(STATUS "TensorFlow TFRecord file format support is not available with Protobuf 2") - else() - message(STATUS "Enabling TensorFlow TFRecord file format support") - add_definitions(-DDALI_BUILD_PROTO3=1) - set(BUILD_PROTO3 ON CACHE STRING "Build proto3") - endif() + find_package(Protobuf 3.6.1 REQUIRED) + message(STATUS "Enabling TensorFlow TFRecord file format support") + add_definitions(-DDALI_BUILD_PROTO3=1) + set(BUILD_PROTO3 ON CACHE STRING "Build proto3") include_directories(SYSTEM ${Protobuf_INCLUDE_DIRS}) list(APPEND DALI_LIBS protobuf::libprotobuf) diff --git a/conda/dali_native_libs/recipe/meta.yaml b/conda/dali_native_libs/recipe/meta.yaml index 495f7a0a6f..e4ef589d3d 100644 --- a/conda/dali_native_libs/recipe/meta.yaml +++ b/conda/dali_native_libs/recipe/meta.yaml @@ -70,8 +70,8 @@ requirements: - python-clang - git-lfs host: - - protobuf - - libprotobuf-static + - protobuf >=3.6.1 + - libprotobuf-static >=3.6.1 - libjpeg-turbo - dali-opencv - dali-ffmpeg @@ -98,7 +98,7 @@ requirements: # dependency to install the right version on the libabseil (as protobuf depends on # libprotobuf-static and a newer version of libprotobuf-static may be available than # the protobuf was build with) - - protobuf + - protobuf >=3.6.1 - openjpeg - cfitsio about: diff --git a/conda/dali_python_bindings/recipe/meta.yaml b/conda/dali_python_bindings/recipe/meta.yaml index 13f87cd5a2..358249b070 100644 --- a/conda/dali_python_bindings/recipe/meta.yaml +++ b/conda/dali_python_bindings/recipe/meta.yaml @@ -78,10 +78,10 @@ requirements: host: - dali-opencv - dali-ffmpeg - - libprotobuf-static + - libprotobuf-static >=3.6.1 - python - future - - protobuf + - protobuf >=3.6.1 - astunparse >=1.6.0 - gast >=0.3.3 - dm-tree >=0.1.8