Source release 17.1.0
This commit is contained in:
@@ -97,6 +97,10 @@ function(_protobuf_find_libraries name filename)
|
||||
else()
|
||||
get_target_property(${name}_LIBRARY_RELEASE protobuf::lib${filename}
|
||||
LOCATION_RELEASE)
|
||||
get_target_property(${name}_LIBRARY_RELWITHDEBINFO protobuf::lib${filename}
|
||||
LOCATION_RELWITHDEBINFO)
|
||||
get_target_property(${name}_LIBRARY_MINSIZEREL protobuf::lib${filename}
|
||||
LOCATION_MINSIZEREL)
|
||||
get_target_property(${name}_LIBRARY_DEBUG protobuf::lib${filename}
|
||||
LOCATION_DEBUG)
|
||||
|
||||
@@ -106,16 +110,6 @@ function(_protobuf_find_libraries name filename)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Internal function: find threads library
|
||||
function(_protobuf_find_threads)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_package(Threads)
|
||||
if(Threads_FOUND)
|
||||
list(APPEND PROTOBUF_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
set(PROTOBUF_LIBRARIES "${PROTOBUF_LIBRARIES}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# Main.
|
||||
#
|
||||
@@ -135,10 +129,6 @@ _protobuf_find_libraries(Protobuf_LITE protobuf-lite)
|
||||
# The Protobuf Protoc Library
|
||||
_protobuf_find_libraries(Protobuf_PROTOC protoc)
|
||||
|
||||
if(UNIX)
|
||||
_protobuf_find_threads()
|
||||
endif()
|
||||
|
||||
# Set the include directory
|
||||
get_target_property(Protobuf_INCLUDE_DIRS protobuf::libprotobuf
|
||||
INTERFACE_INCLUDE_DIRECTORIES)
|
||||
@@ -146,6 +136,14 @@ get_target_property(Protobuf_INCLUDE_DIRS protobuf::libprotobuf
|
||||
# Set the protoc Executable
|
||||
get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
|
||||
IMPORTED_LOCATION_RELEASE)
|
||||
if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO)
|
||||
endif()
|
||||
if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
|
||||
IMPORTED_LOCATION_MINSIZEREL)
|
||||
endif()
|
||||
if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc
|
||||
IMPORTED_LOCATION_DEBUG)
|
||||
|
||||
Reference in New Issue
Block a user