aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChristian von Arnim <christian.vonarnim@gmail.com>2018-05-14 08:52:28 +0200
committerChristian von Arnim <christian.vonarnim@gmail.com>2018-05-14 09:22:08 +0200
commite8ae76fbde910720faa1708b6910f6ba7275e8aa (patch)
tree9e79f5c0af33ce72ecb8de27f5ceb5cc0a395cad /cmake
parentb61dd9d9a229c5a82788fdeefa344aa65affae09 (diff)
downloadprotobuf-e8ae76fbde910720faa1708b6910f6ba7275e8aa.tar.gz
protobuf-e8ae76fbde910720faa1708b6910f6ba7275e8aa.tar.bz2
protobuf-e8ae76fbde910720faa1708b6910f6ba7275e8aa.zip
cmake: Use GENERATE_EXTENSIONS parameter in protobuf_generate
Diffstat (limited to 'cmake')
-rw-r--r--cmake/protobuf-config.cmake.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in
index acedcc7a..0e2380a8 100644
--- a/cmake/protobuf-config.cmake.in
+++ b/cmake/protobuf-config.cmake.in
@@ -38,11 +38,11 @@ function(protobuf_generate)
set(_dll_export_decl "dllexport_decl=${protobuf_generate_EXPORT_MACRO}:")
endif()
- if(NOT protobuf_GENERATE_EXTENSIONS)
+ if(NOT protobuf_generate_GENERATE_EXTENSIONS)
if(protobuf_generate_LANGUAGE STREQUAL cpp)
- set(protobuf_GENERATE_EXTENSIONS .pb.h .pb.cc)
+ set(protobuf_generate_GENERATE_EXTENSIONS .pb.h .pb.cc)
elseif(protobuf_generate_LANGUAGE STREQUAL python)
- set(protobuf_GENERATE_EXTENSIONS _pb2.py)
+ set(protobuf_generate_GENERATE_EXTENSIONS _pb2.py)
else()
message(SEND_ERROR "Error: protobuf_generate given unknown Language ${LANGUAGE}, please provide a value for GENERATE_EXTENSIONS")
return()
@@ -91,7 +91,7 @@ function(protobuf_generate)
get_filename_component(_basename ${_proto} NAME_WE)
set(_generated_srcs)
- foreach(_ext ${protobuf_GENERATE_EXTENSIONS})
+ foreach(_ext ${protobuf_generate_GENERATE_EXTENSIONS})
list(APPEND _generated_srcs "${CMAKE_CURRENT_BINARY_DIR}/${_basename}${_ext}")
endforeach()
list(APPEND _generated_srcs_all ${_generated_srcs})