cmake: Add support for custom protoc executable via OR_TOOLS_PROTOC_EXECUTABLE
Allow users to specify a custom protoc executable by setting the OR_TOOLS_PROTOC_EXECUTABLE variable, which takes precedence over the default cross-compilation and system protoc detection logic. Signed-off-by: Clément Péron <peron.clem@gmail.com>
This commit is contained in:
committed by
Corentin Le Molgat
parent
0ca1d9b8d8
commit
a56a50aa00
@@ -11,6 +11,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if (OR_TOOLS_PROTOC_EXECUTABLE)
|
||||
set(PROTOC_PRG ${OR_TOOLS_PROTOC_EXECUTABLE})
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
set(PROTOC_PRG protobuf::protoc)
|
||||
return()
|
||||
|
||||
Reference in New Issue
Block a user