From 97b79eeb86eedee57630b8d29f6eeab08ccb02b0 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sun, 30 Nov 2014 13:05:19 +0100 Subject: add flatbuffer support and use that for the handshake --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e0e3796..91c4568 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 2.8) + # ECM setup find_package(ECM 0.0.10 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH @@ -18,11 +19,21 @@ include(ECMPackageConfigHelpers) # include(KDECMakeSettings) find_package(Qt5Core REQUIRED) +find_package(FlatBuffers REQUIRED) +function(generate_flatbuffers dest) + # TODO: move the file from ${fbs}_generated.h to just ${fbs}? + foreach(fbs ${ARGN}) + execute_process(COMMAND ${FLATBUFFERS_FLATC_EXECUTABLE} -c -b --gen-includes -o ${dest} ${CMAKE_CURRENT_SOURCE_DIR}/${fbs}) + endforeach(fbs) +endfunction(generate_flatbuffers) set(CMAKE_AUTOMOC ON) add_definitions("-Wall -std=c++0x") include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) +# common, eventually a lib but right now just the command buffers +add_subdirectory(common) + # the client add_subdirectory(client) -- cgit v1.2.3