From 689471877bc6ae66489cbfa8734ce4f1ab085ab5 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Mon, 10 Jun 2019 17:11:31 +0100 Subject: Github #208 Search for flatc on standard paths Change-Id: Ib5a77dc4b654c67d79f1f53e783b319c885b5215 Signed-off-by: Matthew Bentham --- src/armnnSerializer/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/armnnSerializer/CMakeLists.txt b/src/armnnSerializer/CMakeLists.txt index af2262d5fa..225999bbc4 100755 --- a/src/armnnSerializer/CMakeLists.txt +++ b/src/armnnSerializer/CMakeLists.txt @@ -3,10 +3,17 @@ # SPDX-License-Identifier: MIT # if(BUILD_ARMNN_SERIALIZER) + find_program(FLATC flatc + HINTS ${FLATC_DIR} + DOC "Path to 'flatc', the flatbuffers compiler") + if (NOT FLATC) + message(SEND_ERROR "flatc not found. Specify the full path of the flatc executable with -DFLATC=") + endif() + add_custom_command( # Generate an ArmnnSchema_generated.h file if it doesn't exist, or update it when necessary otherwise OUTPUT ArmnnSchema_generated.h DEPENDS ArmnnSchema.fbs - COMMAND ${FLATC_DIR}/flatc -o ${CMAKE_CURRENT_BINARY_DIR} --cpp ${CMAKE_CURRENT_SOURCE_DIR}/ArmnnSchema.fbs + COMMAND ${FLATC} -o ${CMAKE_CURRENT_BINARY_DIR} --cpp ${CMAKE_CURRENT_SOURCE_DIR}/ArmnnSchema.fbs ) set(armnn_serializer_sources) -- cgit v1.2.1