summaryrefslogtreecommitdiffstats
path: root/Tests/FindProtobuf
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-22 14:48:41 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-22 14:51:55 (GMT)
commita5ccddf05758daa0652ed6674581a871fc683a39 (patch)
tree8b2ce721a64d16a40b251f7cfd767a110daec910 /Tests/FindProtobuf
parent73038a85ea5d290bffc40a28ca8fa5a8d74c472c (diff)
downloadCMake-a5ccddf05758daa0652ed6674581a871fc683a39.zip
CMake-a5ccddf05758daa0652ed6674581a871fc683a39.tar.gz
CMake-a5ccddf05758daa0652ed6674581a871fc683a39.tar.bz2
FindProtobuf: Rename imported targets to match upstream names
Rename our recently added imported targets to match those provided by the upstream's CMake-based build. That way a project using `find_package(Protobuf)` can get the same target names no matter how protobuf is found. Suggested-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Diffstat (limited to 'Tests/FindProtobuf')
-rw-r--r--Tests/FindProtobuf/Test/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/FindProtobuf/Test/CMakeLists.txt b/Tests/FindProtobuf/Test/CMakeLists.txt
index d7a5081..8b6e38a 100644
--- a/Tests/FindProtobuf/Test/CMakeLists.txt
+++ b/Tests/FindProtobuf/Test/CMakeLists.txt
@@ -5,7 +5,7 @@ include(CTest)
find_package(Protobuf REQUIRED)
add_executable(test_tgt main.cxx)
-target_link_libraries(test_tgt Protobuf::protobuf)
+target_link_libraries(test_tgt protobuf::libprotobuf)
add_test(NAME test_tgt COMMAND test_tgt)
add_executable(test_var main.cxx)
@@ -14,7 +14,7 @@ target_link_libraries(test_var PRIVATE ${Protobuf_LIBRARIES})
add_test(NAME test_var COMMAND test_var)
add_executable(test_tgt_lite main.cxx)
-target_link_libraries(test_tgt_lite Protobuf::protobuf-lite)
+target_link_libraries(test_tgt_lite protobuf::libprotobuf-lite)
add_test(NAME test_tgt_lite COMMAND test_tgt_lite)
add_executable(test_var_lite main.cxx)
@@ -23,7 +23,7 @@ target_link_libraries(test_var_lite PRIVATE ${Protobuf_LITE_LIBRARIES})
add_test(NAME test_var_lite COMMAND test_var_lite)
add_executable(test_tgt_protoc main-protoc.cxx)
-target_link_libraries(test_tgt_protoc Protobuf::protoc)
+target_link_libraries(test_tgt_protoc protobuf::libprotoc)
add_test(NAME test_tgt_protoc COMMAND test_tgt_protoc)
add_executable(test_var_protoc main-protoc.cxx)