Skip to content

Commit

Permalink
Fix protobuf linker errors on mingw2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 12, 2023
1 parent 07d2c24 commit d63cde6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@ if(WITH_CORE)
message (SEND_ERROR "sqlite3 dependency was not found!")
endif()

find_package(Protobuf REQUIRED) # for decoding of vector tiles in MVT format
# workaround errors with older cmake -- see https://github.com/protocolbuffers/protobuf/issues/12292
find_package(Protobuf CONFIG) # for decoding of vector tiles in MVT format
if (NOT Protobuf_FOUND)
FIND_PACKAGE(Protobuf REQUIRED)
endif()

message(STATUS "Found Protobuf: ${Protobuf_LIBRARIES}")
if (NOT Protobuf_PROTOC_EXECUTABLE)
message (SEND_ERROR "Protobuf library's 'protoc' tool was not found!")
Expand Down

0 comments on commit d63cde6

Please sign in to comment.