Add CMake ALIAS targets
We follow the findProtobuf.cmake naming convention to ease the use of protobuf as cmake subproject
This commit is contained in:
parent
3bc0282fb6
commit
f7a05844eb
@ -65,3 +65,4 @@ set_target_properties(libprotobuf-lite PROPERTIES
|
||||
VERSION ${protobuf_VERSION}
|
||||
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
|
||||
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
||||
add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite)
|
||||
|
@ -128,3 +128,4 @@ set_target_properties(libprotobuf PROPERTIES
|
||||
VERSION ${protobuf_VERSION}
|
||||
OUTPUT_NAME ${LIB_PREFIX}protobuf
|
||||
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
||||
add_library(protobuf::libprotobuf ALIAS libprotobuf)
|
||||
|
@ -228,3 +228,4 @@ set_target_properties(libprotoc PROPERTIES
|
||||
VERSION ${protobuf_VERSION}
|
||||
OUTPUT_NAME ${LIB_PREFIX}protoc
|
||||
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
||||
add_library(protobuf::libprotoc ALIAS libprotoc)
|
||||
|
@ -4,3 +4,4 @@ set(protoc_files
|
||||
|
||||
add_executable(protoc ${protoc_files})
|
||||
target_link_libraries(protoc libprotobuf libprotoc)
|
||||
add_executable(protobuf::protoc ALIAS protoc)
|
||||
|
Loading…
Reference in New Issue
Block a user