luffy-zh commented on code in PR #1963:
URL: https://github.com/apache/orc/pull/1963#discussion_r1663446826
##########
cmake_modules/FindProtobuf.cmake:
##########
@@ -55,15 +56,34 @@ if (Protobuf_FOUND)
get_target_property (target_type protobuf::libprotobuf TYPE)
if (target_type STREQUAL "STATIC_LIBRARY")
- set(PROTOBUF_STATIC_LIB protobuf::libprotobuf)
+ set (PROTOBUF_STATIC_LIB protobuf::libprotobuf)
endif ()
get_target_property (target_type protobuf::libprotoc TYPE)
if (target_type STREQUAL "STATIC_LIBRARY")
- set (PROTOC_STATIC_LIB protobuf::libprotoc)
+ set (PROTOC_STATIC_LIB protobuf::libprotoc)
endif ()
- get_target_property (PROTOBUF_INCLUDE_DIR protobuf::libprotoc
INTERFACE_INCLUDE_DIRECTORIES)
+ get_target_property (PROTOBUF_INCLUDE_DIR protobuf::libprotobuf
INTERFACE_INCLUDE_DIRECTORIES)
+ if (NOT PROTOBUF_INCLUDE_DIR)
+ set (PROTOBUF_INCLUDE_DIR ${Protobuf_INCLUDE_DIRS})
+ if (NOT PROTOBUF_INCLUDE_DIR)
+ message(FATAL_ERROR "Cannot determine Protobuf include directory.")
+ endif ()
+ endif ()
+ else ()
+ set (PROTOBUF_LIBRARY ${Protobuf_LIBRARIES})
+ set (PROTOBUF_INCLUDE_DIR ${Protobuf_INCLUDE_DIRS})
+ if (NOT PROTOBUF_INCLUDE_DIR)
+ message(FATAL_ERROR "Cannot determine Protobuf include directory.")
+ endif ()
+
+ if (Protobuf_LIBRARIES MATCHES "\\.a$")
Review Comment:
Thanks for looking at that, '.a' has been replaced with
CMAKE_STATIC_LIBRARY_SUFFIX
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]